Commit a083dd6
committed
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.1 parent 82b4544 commit a083dd6
1 file changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2873 | 2873 | | |
2874 | 2874 | | |
2875 | 2875 | | |
2876 | | - | |
2877 | | - | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
| 2886 | + | |
| 2887 | + | |
| 2888 | + | |
| 2889 | + | |
| 2890 | + | |
| 2891 | + | |
| 2892 | + | |
| 2893 | + | |
| 2894 | + | |
| 2895 | + | |
| 2896 | + | |
| 2897 | + | |
| 2898 | + | |
| 2899 | + | |
| 2900 | + | |
| 2901 | + | |
2878 | 2902 | | |
| 2903 | + | |
| 2904 | + | |
2879 | 2905 | | |
2880 | 2906 | | |
2881 | 2907 | | |
| |||
0 commit comments