forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#48635 - scottmcm:faster-zip-nth, r=kennytm
Specialize Zip::nth for TrustedRandomAccess Fixes the performance difference observed in https://users.rust-lang.org/t/performance-difference-between-iterator-zip-and-skip-order/15743 Before: ``` test iter::bench_skip_then_zip ... bench: 154 ns/iter (+/- 4) test iter::bench_zip_then_skip ... bench: 4,725 ns/iter (+/- 225) ``` After: ``` test iter::bench_skip_then_zip ... bench: 154 ns/iter (+/- 2) test iter::bench_zip_then_skip ... bench: 81 ns/iter (+/- 19) ```
- Loading branch information
Showing
3 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters