diff options
author | Bjørn Erik Pedersen <[email protected]> | 2024-07-03 11:20:46 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2024-07-06 14:08:15 +0200 |
commit | 644d55475d631f60177eb792e9a010a39160df85 (patch) | |
tree | 327f2322d52e628a07f0d0690b3ce12f3f68709f /go.mod | |
parent | edeed52fc5d7c9c25fee53e0b66c155e248cf09d (diff) | |
download | hugo-644d55475d631f60177eb792e9a010a39160df85.tar.gz hugo-644d55475d631f60177eb792e9a010a39160df85.zip |
Add hash.XxHash
Also move the non crypto hash funcs into this new package.
This is much faster than e.g. MD5, especially for larger inputs:
```
BenchmarkXxHash/xxHash_43-10 9917955 112.2 ns/op 56 B/op 4 allocs/op
BenchmarkXxHash/mdb5_43-10 6017239 204.1 ns/op 96 B/op 3 allocs/op
BenchmarkXxHash/fnv32a_43-10 14407333 82.30 ns/op 16 B/op 1 allocs/op
BenchmarkXxHash/xxHash_4300-10 2916892 409.7 ns/op 56 B/op 4 allocs/op
BenchmarkXxHash/mdb5_4300-10 159748 7491 ns/op 4912 B/op 3 allocs/op
BenchmarkXxHash/fnv32a_4300-10 218210 5510 ns/op 16 B/op 1 allocs/op
```
Fixes #12635
Diffstat (limited to 'go.mod')
-rw-r--r-- | go.mod | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -21,6 +21,7 @@ require ( github.com/bep/overlayfs v0.9.2 github.com/bep/simplecobra v0.4.0 github.com/bep/tmc v0.5.1 + github.com/cespare/xxhash/v2 v2.3.0 github.com/clbanning/mxj/v2 v2.7.0 github.com/cli/safeexec v1.0.1 github.com/disintegration/gift v1.2.1 |