Uh oh!
There was an error while loading. Please reload this page.
Inline __iterator_get_unchecked for some iterator adapters. - #92566
Conversation
rust-highfive
commented
Jan 5, 2022
r? @m-ou-se (rust-highfive has picked a reviewer for you, use r? to override) |
5bd8a31 to
4f3fafaCompareJohnTitor
commented
May 1, 2022
The result on the OP looks neat to me, is it worth running a perf-check? |
m-ou-se
commented
May 2, 2022
@bors r+ rollup=never |
bors
commented
May 2, 2022
📌 Commit 4f3fafa077a95748cac75f6247eb2ae2fd0cf97c has been approved by |
bors
commented
May 2, 2022
⌛ Testing commit 4f3fafa077a95748cac75f6247eb2ae2fd0cf97c with merge 51205365b7eb58544dcf212d26028dfe2e7a587c... |
bors
commented
May 2, 2022
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
…ed` with those of `next()` on adapters that have both. It improves the performance of iterators using unchecked access when building in incremental mode (due to the larger CGU count?). It might negatively affect incremental compile times for better runtime results, but considering that the equivalent `next()` implementations also are `#[inline]` and usually are more complex this should be ok. ``` ./x.py bench library/core -i --stage 0 --test-args bench_trusted_random_access OLD: 119,172 ns/iter NEW: 17,714 ns/iter ```
the8472
commented
May 2, 2022
The bench-executed-as-test overflowed an usize on a 32bit build with overflow checks. It now uses wrapping_add instead to avoid that since the computed results are not relevant to the benchmark, it's just exercising the adapters. I'll go ahead and assume that that fix is tiny enough that doesn't need a new review. @bors r=m-ou-se rollup=never |
bors
commented
May 2, 2022
📌 Commit a68a5d2 has been approved by |
bors
commented
May 2, 2022
bors
commented
May 3, 2022
☀️ Test successful - checks-actions |
rust-timer
commented
May 3, 2022
Finished benchmarking commit (3d0ac7e): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression Footnotes |
This aligns the inline attributes of existing
__iterator_get_uncheckedwith those ofnext()on adapters that have both.It improves the performance of iterators using unchecked access when building in incremental mode (due to the larger CGU count?). It might negatively affect incremental compile times for better runtime results, but considering that the equivalent
next()implementations also are#[inline]and usually are more complex this should be ok.