-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Reoptimize layout array #99174
Reoptimize layout array #99174
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit cb8aba66ef6a0e17f08a0574e4820653e31b45a0 with merge c664874490fa0b8cc67066d620a5b53d8ed52cc9... |
☀️ Try build successful - checks-actions |
Queued c664874490fa0b8cc67066d620a5b53d8ed52cc9 with parent b3f4c31, future comparison URL. |
Finished benchmarking commit (c664874490fa0b8cc67066d620a5b53d8ed52cc9): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
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.
No measured regressions and reverses a few of the primary regressions from #95295; lgtm
cb8aba6
to
63d4da9
Compare
This way it's one check instead of two, so hopefully it'll be better Nightly: ``` layout_array_i32: movq %rdi, %rax movl $4, %ecx mulq %rcx jo .LBB1_2 movabsq $9223372036854775805, %rcx cmpq %rcx, %rax jae .LBB1_2 movl $4, %edx retq .LBB1_2: … ``` This PR: ``` movq %rcx, %rax shrq $61, %rax jne .LBB2_1 shlq $2, %rcx movl $4, %edx movq %rcx, %rax retq .LBB2_1: … ```
63d4da9
to
a32305a
Compare
Rebased atop the predecessor; might as well re-check perf just to be sure. @bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a32305a with merge a28451281f53cbdfbe9f61b22b15a00d24a71a9a... |
☀️ Try build successful - checks-actions |
Queued a28451281f53cbdfbe9f61b22b15a00d24a71a9a with parent 87588a2, future comparison URL. |
Finished benchmarking commit (a28451281f53cbdfbe9f61b22b15a00d24a71a9a): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. @bors rollup=never Footnotes |
Delta delta is within noise. Same as last time: this looks to be a small but measurable win. |
Re-rolling for a new reviewer since it's been 4 weeks: |
LGTM. @bors r+ rollup=never |
⌛ Testing commit a32305a with merge b5fa4672c865a8f7a69de98f7d4f744bd0b576c5... |
💥 Test timed out |
@rust-lang/infra in case you aren't aware already, bors is not feeling well |
@bors retry (x86_64-msvc-1 builder timed out) |
☀️ Test successful - checks-actions |
Finished benchmarking commit (908fc5b): comparison url. Instruction count
Max RSS (memory usage)Results
CyclesResults
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
This way it's one check instead of two, so hopefully (cc #99117) it'll be simpler for rustc perf too 🤞
Quick demonstration:
Nightly: https://play.rust-lang.org/?version=nightly&mode=release&edition=2021&gist=e97bf33508aa03f38968101cdeb5322d
This PR (note no
mul
, in addition to being much shorter):This is built atop @CAD97 's #99136; the new changes are cb8aba66ef6a0e17f08a0574e4820653e31b45a0.
I added a bunch more tests for
Layout::from_size_align
andLayout::array
too.