Repository navigation
Specialize advance_back_by like the forward version - #163361
Conversation
We specialized `advance_by` in rust-lang#141086, so it makes sense to have `advance_back_by` use the same trick in reverse, i.e. `try_rfold`. This also updates `nth_back` to mirror `nth`, and the rest of the `DoubleEndedIterator` methods already match `Iterator`.
|
r? @Darksonn rustbot has assigned @Darksonn. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
|
The previous PR used a |
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Specialize `advance_back_by` like the forward version
…rksonn Specialize `advance_back_by` like the forward version We specialized `advance_by` in rust-lang#141086, so it makes sense to have `advance_back_by` use the same trick in reverse, i.e. `try_rfold`. This also updates `nth_back` to mirror `nth`, and the rest of the `DoubleEndedIterator` methods already match `Iterator`.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (12cc55c): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never rustc-perf Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.9%, secondary 2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 4.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.4%, secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 491.711s -> 492.163s (0.09%) |
This comment has been minimized.
This comment has been minimized.
|
IMO (though biased as author) that perf change is not significant enough to worry about. |
|
Yeah, it's fine. I just wanted to see if we'd see any improvements. rustbot label: +perf-regression-triaged |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing ea6bb45 (parent) -> 4853db6 (this PR) Test differencesShow 42 test diffs42 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 4853db6f65c9edf8e52fdf3f4eb711d188d15fc6 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (4853db6): comparison URL. Overall result: ❌ regressions - please read:Our benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 0.7%, secondary 2.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.4%, secondary 0.3%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 489.575s -> 489.608s (0.01%) |
We specialized
advance_byin #141086, so it makes sense to haveadvance_back_byuse the same trick in reverse, i.e.try_rfold.This also updates
nth_backto mirrornth, and the rest of theDoubleEndedIteratormethods already matchIterator.