-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more per-module compiler options #37041
Conversation
Maybe |
I tried to use this option in all Gadfly modules to measure the effect on TtFP. I used this example, http://gadflyjl.org/stable/lib/statistics/#Gadfly.Stat.density, with the master versions of Gadfly and Compose but after setting ERROR: LoadError: MethodError: no method matching evalmapping(::DataFrame, ::Symbol)
Closest candidates are:
evalmapping(::Any, ::AbstractArray) at /Users/andreasnoack/.julia/dev/Gadfly/src/mapping.jl:183
evalmapping(::Any, ::Distribution) at /Users/andreasnoack/.julia/dev/Gadfly/src/mapping.jl:185
evalmapping(::Gadfly.MeltedData, ::Symbol) at /Users/andreasnoack/.julia/dev/Gadfly/src/mapping.jl:194
...
Stacktrace:
[1] _evalmapping!(mapping::Dict{Symbol,Any}, data_source::DataFrame, data::Gadfly.Data)
@ Gadfly ~/.julia/dev/Gadfly/src/mapping.jl:204
[2] evalmapping!(mapping::Dict{Symbol,Any}, data_source::DataFrame, data::Gadfly.Data)
@ Gadfly ~/.julia/dev/Gadfly/src/mapping.jl:233
[3] plot(::DataFrame, ::Dict{Symbol,Symbol}, ::Type{Gadfly.Geom.LineGeometry}, ::Type{Gadfly.Geom.RibbonGeometry}, ::Gadfly.Guide.YLabel, ::Theme, ::Vararg{Union{Vector{Layer}, Function, Gadfly.Element, Theme, Type},N} where N)
@ Gadfly ~/.julia/dev/Gadfly/src/Gadfly.jl:331
[4] plot(::DataFrame, ::Type{Gadfly.Geom.LineGeometry}, ::Vararg{Union{Vector{Layer}, Function, Gadfly.Element, Theme, Type},N} where N; mapping::Base.Iterators.Pairs{Symbol,Symbol,NTuple{5,Symbol},NamedTuple{(:x, :y, :ymin, :ymax, :color),NTuple{5,Symbol}}})
@ Gadfly ~/.julia/dev/Gadfly/src/Gadfly.jl:293
[5] top-level scope
@ ~/Desktop/test_gadfly.jl:7
in expression starting at /Users/andreasnoack/Desktop/test_gadfly.jl:7 |
Hmmm, it appears that if I use |
Fixed. |
e598522
to
8754473
Compare
Just ran an experiment with some WIP branches of BinaryBuilder and tall stacks of JLLs; it turns out that with this branch and the recent improvements that Mosè and I have been working on for BinaryBuilder, I can load For an end-to-end test with much more than just loading JLL packages, we can step back in time a little bit and look at "Time To First Face of Victory": using TestImages, ImageView
imshow(testimage("mandrill")) Running that segment on latest |
Maybe it would be worth considering keeping compile options in an optional separate TOML file or something? |
8754473
to
3ef6c73
Compare
Ready to go. @andreasnoack I suspect that was the same |
A.
I did add to the module:
and the "infer=false" part seems to work (that line is run, confirmed by injecting typo), if I skip only that part, I get consistently slower for the former timing. But for the latter, on defaults, the code seems to do nothing! Or at lest isn't fully effective (for JLLs). So does Jeff PR have a bug? For the former loading.jl: _include_from_serialized: line 586 takes like half of the time, and for the latter like 80%. B. |
I get the following times: no options in Zlib_jll: adding options to Zlib_jll: I don't see any surprises from removing just Of course, passing |
This PR has been really helpful for me! Is there current any work in improving the granularity? For instance, rather than turning of inference altogether instead considering fewer methods. I have been experimenting with it myself with some success |
if ccall(:jl_get_module_infer, Cint, (Any,), method.module) == 0 | ||
return Any, nothing | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to go at the top of the method (before looking at the cache), to ensure this code is stable
if ccall(:jl_get_module_infer, Cint, (Any,), method.module) == 0 | ||
return retrieve_code_info(mi) | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here. and also because this code is holding a lock, which must be released before returning
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this code is needed here, though, or if it should go in jl_generate_fptr_impl
with the other heuristics. It feels like the implementation here is instead dictating policy decisions here, and ignoring the user's specific instruction.
There was an unintended collision in meaning between JuliaLang#42128 and JuliaLang#37041. Since both use the `Expr(:meta)` mechanism, it doesn't really seem feasible to have them both use the same name. Consequently, it's better to rename the newer meaning. Fixes JuliaLang#42373
There was an unintended collision in meaning between JuliaLang#42128 and JuliaLang#37041. Since both use the `Expr(:meta)` mechanism, it doesn't really seem feasible to have them both use the same name. Consequently, it's better to rename the newer meaning. Fixes JuliaLang#42373
This is an expansion of
@optlevel
, giving you e.g.@compiler_options compile=min optimize=0 infer=false
. The first two correspond directly to the--compile
and--optimize
command-line options, and theinfer
one is new. I like the idea of basically just changing some command-line options at the module level.@options
is very generic so I'd appreciate any suggestions for a better name.