Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace blake2b implementation by golang.org/x/crypto
In 2016-12-13 d8e61c69ab46ca38328da2f4995abaf93b252290 golang.org/x/crypto gained a blake2b AVX implementation. There is also an AVX2 one. It is faster than what we are using right now. This commit allows for faster code and remove a dependency. For future improvements (like NEON) /x/crypto seems more maintained (it isn't an archived repo). benchmark old ns/op new ns/op delta BenchmarkSum128-12 252 140 -44.35% BenchmarkSum1K-12 1221 986 -19.24% benchmark old MB/s new MB/s speedup BenchmarkSum128-12 507.37 911.98 1.80x BenchmarkSum1K-12 838.70 1038.43 1.24x
- Loading branch information
Showing
3 changed files
with
28 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,17 @@ | ||
module github.com/multiformats/go-multihash | ||
|
||
require ( | ||
github.com/minio/blake2b-simd v0.0.0-20160723061019-3f5f724cb5b1 | ||
github.com/minio/sha256-simd v1.0.0 | ||
github.com/mr-tron/base58 v1.2.0 | ||
github.com/multiformats/go-varint v0.0.6 | ||
github.com/spaolacci/murmur3 v1.1.0 | ||
golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 | ||
golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e | ||
lukechampine.com/blake3 v1.1.6 | ||
) | ||
|
||
require ( | ||
github.com/klauspost/cpuid/v2 v2.0.9 // indirect | ||
golang.org/x/sys v0.0.0-20210309074719-68d13333faf2 // indirect | ||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect | ||
) | ||
|
||
go 1.17 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters