]> Cypherpunks repositories - gostls13.git/commit
hash: more efficient memory allocation
authorPascal S. de Kloe <pascal@quies.net>
Tue, 10 Apr 2012 19:15:39 +0000 (15:15 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 10 Apr 2012 19:15:39 +0000 (15:15 -0400)
commit9feddd0bae188825e01771d182b84e47b159aa30
tree80304d62b739f41dcd38d2ea9dc6fb5963bf0dff
parent7056ec6bfd99e204ebf12dc20fe4c78ad623b581
hash: more efficient memory allocation

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
src/pkg/hash/adler32/adler32.go
src/pkg/hash/adler32/adler32_test.go
src/pkg/hash/crc32/crc32.go
src/pkg/hash/crc32/crc32_test.go
src/pkg/hash/crc64/crc64.go
src/pkg/hash/crc64/crc64_test.go
src/pkg/hash/fnv/fnv.go
src/pkg/hash/fnv/fnv_test.go