Implement advance_by via try_fold for Sized iterators#141086
Implement advance_by via try_fold for Sized iterators#141086bors merged 1 commit intorust-lang:masterfrom
advance_by via try_fold for Sized iterators#141086Conversation
When `try_fold` is overriden, it is usually easier for compilers to optimize.
|
@bors r+ rollup=never |
|
☀️ Test successful - checks-actions |
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 aa57e46 (parent) -> 88b3b52 (this PR) Test differencesShow 548 test diffs548 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 88b3b520e852e01970c3f519339ba64ed3e7db6d --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 (88b3b52): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 1.4%, secondary -0.6%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 1.7%, secondary 2.3%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (primary 0.2%, secondary 0.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 776.084s -> 775.765s (-0.04%) |
Implement `advance_by` via `try_fold` for `Sized` iterators When `try_fold` is overriden, it is usually easier for compilers to optimize. Example difference: https://iter.godbolt.org/z/z8cEfnKro
|
On the assumption you meant LLVM, that seems like a reasonable explanation. The difference is in the backend and linker, which makes sense as there is a small amount more code to work with. This happening to ripgrep isn't super surprising — it's probably the crate that would use this the most. Personally I'm satisfied with that explanation, but I also wouldn't know where to start if I were to explore further. |
When
try_foldis overriden, it is usually easier for compilers to optimize.Example difference: https://iter.godbolt.org/z/z8cEfnKro