-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Small optimizations in macro derive #80259
Conversation
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit 0e41d272039134a34d06081c4cb9536d646ec019 with merge daac1498047258893dc86ee7a1f908737a5cbb90... |
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.
Implementation LGTM, queued a perf run, r=me if there's an improvement.
☀️ Try build successful - checks-actions |
Queued daac1498047258893dc86ee7a1f908737a5cbb90 with parent 463ce40, future comparison URL. @rustbot label: +S-waiting-on-perf |
Finished benchmarking try commit (daac1498047258893dc86ee7a1f908737a5cbb90): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
I believe this can only be chocked up to noise; if it's alright I'd like to continue working on this |
e6c06bf
to
35299bc
Compare
This should be good, hopefully it has a minor effect? |
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit 35299bc07437135d217c19074d62693c74db6caa with merge 43e292cf8756d483a054508a0149e128ec285434... |
☀️ Try build successful - checks-actions |
Queued 43e292cf8756d483a054508a0149e128ec285434 with parent 353f3a3, future comparison URL. @rustbot label: +S-waiting-on-perf |
Finished benchmarking try commit (43e292cf8756d483a054508a0149e128ec285434): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Hm, I can't make heads or tails of whether this is just noise at this point(which probably means it is noise), but let me know what you think. |
I agree, it's hard to say if there's any improvement here. If you have other things that you want to try then feel free to, but we might just need to close this unfortunately. |
I'll keep working on it, but will try to avoid perf runs for a bit |
811168a
to
43e2c53
Compare
I believe this should certainly have some perf impact now, altho it's deviated a bit from the original course of the PR I think a lot of the original optimizations were on cold-paths, so they're not noticeable in the benchmarks but aren't bad either. |
Sorry for the delay in getting back to this, @JulianKnodt: I'll trigger another try and perf run, but could you rebase first (I think the try run will fail otherwise)? |
e5f9227
to
36e5c74
Compare
No worries, it's the holidays and all, thank you for helping out even w/ me implementing somewhat random optimizations |
☔ The latest upstream changes (presumably #80547) made this pull request unmergeable. Please resolve the merge conflicts. |
More minor opts Rm unnecessary boxes
Really just one batched allocation, and the rest are style changes
I expect this to have a perf impact because I think this is responsible for lowering types from hir, and that the reason that lowering builtin derives is slow is because the paths are longer. That lead me to find this, which I'm not sure if this is on the hot path or not. If it is, this should certainly be a perf win.
The job Click to see the possible cause of the failure (guessed by this bot)
|
Remove one unnecessary collect at the end of a fn
@bors try @rust-timer queue |
Awaiting bors try build completion. |
⌛ Trying commit d6695bd with merge 61d0d1bc1c119080c4722bd97a803af5207e6ab5... |
☀️ Try build successful - checks-actions |
Queued 61d0d1bc1c119080c4722bd97a803af5207e6ab5 with parent 90ccf4f, future comparison URL. @rustbot label: +S-waiting-on-perf |
Finished benchmarking try commit (61d0d1bc1c119080c4722bd97a803af5207e6ab5): comparison url. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. Please note that if the perf results are neutral, you should likely undo the rollup=never given below by specifying Importantly, though, if the results of this run are non-neutral do not roll this PR up -- it will mask other regressions or improvements in the roll up. @bors rollup=never |
Let me know what you think of these results, some are p good but it's mixed. |
The |
Some small memory optimizations in macro derives, removing some allocations.