diff options
| author | The8472 <git@infinite-source.de> | 2021-11-05 01:07:23 +0100 |
|---|---|---|
| committer | The8472 <git@infinite-source.de> | 2021-11-09 20:54:42 +0100 |
| commit | a083dd653af0f7f46ba6058ab51e1f9d6a2aca7d (patch) | |
| tree | 82e71181dfc6e44c025aba5e5cf7a3b8fcb72d73 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 82b4544ddc58fb905c4457900fa9faf196f79e87 (diff) | |
| download | rust-a083dd653af0f7f46ba6058ab51e1f9d6a2aca7d.tar.gz rust-a083dd653af0f7f46ba6058ab51e1f9d6a2aca7d.zip | |
optimize Hash for Path
Hashing does not have to use the whole Components parsing machinery because we only need it to match the normalizations that Components does. * stripping redundant separators -> skipping separators * stripping redundant '.' directories -> skipping '.' following after a separator That's all it takes. And instead of hashing individual slices for each component we feed the bytes directly into the hasher which avoids hashing the length of each component in addition to its contents.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
