• Pascal S. de Kloe's avatar
    hash: more efficient memory allocation · 9feddd0b
    Pascal S. de Kloe authored
    Feed append the complete content at once.
    
    BenchmarkAdler32KB       1000000              2534 ns/op         404.05 MB/s
    BenchmarkCrc32KB          500000              4757 ns/op         215.26 MB/s
    BenchmarkCrc64KB          500000              4769 ns/op         214.70 MB/s
    BenchmarkFnv32KB         1000000              2417 ns/op         423.64 MB/s
    BenchmarkFnv32aKB        1000000              2408 ns/op         425.23 MB/s
    BenchmarkFnv64KB          500000              4262 ns/op         240.21 MB/s
    BenchmarkFnv64aKB         500000              4234 ns/op         241.83 MB/s
    
    R=iant, rsc, r, minux.ma
    CC=golang-dev
    https://golang.org/cl/5937053
    9feddd0b
adler32.go 1.98 KB