-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Manually split string(a::Union{Char, String, SubString{String}, Symbol}...)
#43939
Conversation
…ol}...)` 4 is one too many for automatic Union-splitting. Poor inference in this method accounts for more than 1000 invalidations.
@JeffBezanson is it worth increasing the limit if the argument is annotated with an explicit Union? |
We union-split up to 4: Line 122 in 3f0ae6e
and so I think this method will be inferred accurately if the union-splitting happens. I rather guess we somehow fail to infer |
The inference was blocked as we set julia/base/compiler/typelimits.jl Lines 7 to 8 in 3f0ae6e
I guess it's not a good idea to increase them? |
…ol}...)` (JuliaLang#43939) * Manually split `string(a::Union{Char, String, SubString{String}, Symbol}...)` 4 is one too many for automatic Union-splitting. Poor inference in this method accounts for more than 1000 invalidations.
This is follow-on work to #43939
…ol}...)` (JuliaLang#43939) * Manually split `string(a::Union{Char, String, SubString{String}, Symbol}...)` 4 is one too many for automatic Union-splitting. Poor inference in this method accounts for more than 1000 invalidations.
This is follow-on work to #43939
4 is one too many for automatic Union-splitting. Poor inference in
this method accounts for more than 2000 invalidations.
Fix (at least partial) for #43157. I don't remember my numbers before this change, but if my vague memory is correct this knocks ~1s off the
using Plots
time and ~2s offdisplay(plot(rand(10)))
. It also brings the number of invalidations down from 2622 to 599.The regression appears to have been introduced in #41992---a very innocuous-seeming change. There still may be more TTFP to fix, though.