-
-
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
Force specialization on the type argument of _similar_for
#30331
Conversation
ce6b4fc
to
e3fceb4
Compare
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
OSX Travis ended with:
Restarted. Benchmarks look good, but were run before I also changed the |
Your benchmark job has completed - possible performance regressions were detected. A full report can be found here. cc @ararslan |
Barring objections (or anyone beating me to it) I'll merge tomorrow. |
What's our policy for backporting performance enhancements to 1.0? |
If they're low risk then absolutely do it. |
(cherry picked from commit 891e2ab)
(cherry picked from commit 891e2ab)
Looking into the
["misc", "iterators", "zip(1:1, 1:1, 1:1, 1:1)"]
regression reported in #30218 (comment), it looks like #28284 pushed theHasShape
method of_similar_for
beyond the inlining threshold for that case, causing the regression. Adding a@_meta_inline
would directly combat that, but forcing specialization on the type argument is less invasive and still restores performance:I hope @nanosoldier
runbenchmarks(ALL, vs = ":master")
agrees. In that case, I guess we want this on 1.1 as well.I vaguely remember having noticed this when working on #29238 but decided it was an orthogonal change to be done in a separate PR and then forgot about it...