-
Notifications
You must be signed in to change notification settings - Fork 14k
Optimize path components iteration on platforms that don't have prefixes #148084
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
Optimize path components iteration on platforms that don't have prefixes #148084
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use |
|
Nice! I was thinking about this when profiling rust-lang/glob#181, because it was clear that getting just the filename is unnecessary slow just becase |
2ee6afb to
92dabe2
Compare
|
This PR was rebased onto a different master commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
92dabe2 to
d263ab3
Compare
added a benchmark for getting filenames |
|
@bors r+ rollup=iffy |
Rollup of 22 pull requests Successful merges: - #128666 (Add `overflow_checks` intrinsic) - #146305 (Add correct suggestion for multi-references for self type in method) - #147179 ([DebugInfo] Fix container types failing to find template args) - #147743 (Show packed field alignment in mir_transform_unaligned_packed_ref) - #148079 (Rename `downcast_[ref|mut]_unchecked` -> `downcast_unchecked_[ref|mut]`) - #148084 (Optimize path components iteration on platforms that don't have prefixes) - #148126 (Fix rust stdlib build failing for VxWorks) - #148204 (Modify contributor email entries in .mailmap) - #148279 (rustc_builtin_macros: rename bench parameter to avoid collisions with user-defined function names) - #148333 (constify result unwrap unchecked) - #148539 (Add Allocator proxy impls for Box, Rc, and Arc) - #148601 (`invalid_atomic_ordering`: also lint `update` & `try_update`) - #148612 (Add note for identifier with attempted hygiene violation) - #148613 (Switch hexagon targets to rust-lld) - #148619 (Enable std locking functions on AIX) - #148644 ([bootstrap] Make `--open` option work with `doc src/tools/error_index_generator`) - #148649 (don't completely reset `HeadUsages`) - #148673 (Remove a remnant of `dyn*` from the parser) - #148675 (Remove eslint-js from npm dependencies) - #148680 (Recover `[T: N]` as `[T; N]`) - #148688 (Remove unused argument `features` from `eval_config_entry`) - #148711 (Use the current lint note id when parsing `cfg!()`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #148084 - the8472:prefixless-path-components-iter, r=Mark-Simulacrum Optimize path components iteration on platforms that don't have prefixes ``` OLD path::bench_path_components_iter 140.20ns/iter +/- 6.08 path::bench_path_file_name 57.62ns/iter +/- 1.62 NEW path::bench_path_components_iter 126.74ns/iter +/- 1.46 path::bench_path_file_name 47.48ns/iter +/- 2.49 ```
Uh oh!
There was an error while loading. Please reload this page.