Skip to content

Conversation

@the8472
Copy link
Member

@the8472 the8472 commented Oct 24, 2025

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Oct 24, 2025

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@Kobzol
Copy link
Member

Kobzol commented Oct 25, 2025

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 .components() has to be called.

@the8472 the8472 force-pushed the prefixless-path-components-iter branch from 2ee6afb to 92dabe2 Compare October 25, 2025 11:59
@rustbot
Copy link
Collaborator

rustbot commented Oct 25, 2025

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.

@the8472 the8472 force-pushed the prefixless-path-components-iter branch from 92dabe2 to d263ab3 Compare October 25, 2025 12:47
@the8472
Copy link
Member Author

the8472 commented Oct 25, 2025

it was clear that getting just the filename is unnecessary slow just becase .components() has to be called.

added a benchmark for getting filenames

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants