617550f073
As expected, the performance increase is only noticeable for small inputs: name old time/op new time/op delta Sum256/64-4 343ns ± 4% 243ns ± 6% -28.96% (p=0.008 n=5+5) Sum256/1024-4 2.62µs ± 1% 2.50µs ± 2% -4.57% (p=0.008 n=5+5) Sum256/65536-4 175µs ± 1% 170µs ± 4% ~ (p=0.190 n=4+5) Co-authored-by: Dmitry Yu Okunev <xaionaro@dx.center> |
||
---|---|---|
testdata | ||
LICENSE | ||
README.md | ||
blake3.go | ||
blake3_test.go | ||
go.mod |
README.md
blake3
go get lukechampine.com/blake3
blake3
implements the BLAKE3 cryptographic hash function.
This implementation is a port of the Rust reference implementation, refactored
into more idiomatic Go style and with a handful of performance tweaks.
Performance is not great, not terrible. Eventually an assembly-optimized
implementation will be merged into x/crypto
, and then you should switch to
that. In the meantime, you can use this package for code that needs BLAKE3
compatibility and doesn't need to be blazing fast.