-
-
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
Reduce code duplication in find* functions #36965
Conversation
predicate and non-predicate versions were introduced by #25577 |
Sounds good, but can you run some benchmarks and look at the generated code to check that this doesn't introduce regressions? |
Yeah, it would be good to have a sense that there aren't performance regressions. Can nanosoldier help here? |
Yes, if there are tests in BaseBenchmarks for this (haven't checked) or if you make a PR to add them. But a quick local check would be enough IMHO. You can also check that the generated code is the same (which is likely). |
Looks like there are some: https://github.com/JuliaCI/BaseBenchmarks.jl/blob/ce11d8badcb0e9f6d8b0518ffd57a472128af930/src/find/FindBenchmarks.jl#L39 but I'll take a look at the generated code, since you're probably right that it didn't change. |
FWIW, I wanted a way to programmatically compare the generated code, and I didn't know how to do that since all the tools seem to print to |
Fixes JuliaLang#43078; This problem was introduced by JuliaLang#36965
Fixes JuliaLang#43078; This problem was introduced by JuliaLang#36965
Try to address #36963
Also, whatever fix arises from #36938 will only need to be applied in a fewer number of places.
I expect the compiler can certainly specialize on
identity
. Is it necessary to force inlining?