mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-24 07:44:10 +00:00
9fef8d91b4
optimize Eq implementation for paths Filesystems generally have a tree-ish structure which means paths are more likely to share a prefix than a suffix. Absolute paths are especially prone to share long prefixes. quick benchmark consisting of a search through through a vec containing the absolute paths of all (1850) files in `compiler/`: ``` # old test path::tests::bench_path_cmp ... bench: 227,407 ns/iter (+/- 2,162) # new test path::tests::bench_path_cmp ... bench: 64,976 ns/iter (+/- 1,142) ``` |
||
---|---|---|
.. | ||
alloc | ||
backtrace@221483ebaf | ||
core | ||
panic_abort | ||
panic_unwind | ||
proc_macro | ||
profiler_builtins | ||
rtstartup | ||
rustc-std-workspace-alloc | ||
rustc-std-workspace-core | ||
rustc-std-workspace-std | ||
std | ||
stdarch@3001c75a1d | ||
term | ||
test | ||
unwind |