go/src/hash
Davies Liu 1e0760354c hash/crc32: speedup crc32 of IEEE using slicingBy8
The Slicing-By-8 [1] algorithm has much performance improvements than
current approach. This patch only uses it for IEEE, which is the most
common case in practice.

There is the benchmark on Mac OS X 10.9:

benchmark                     old MB/s     new MB/s     speedup
BenchmarkIEEECrc1KB           349.40       353.03       1.01x
BenchmarkIEEECrc4KB           351.55       934.35       2.66x
BenchmarkCastagnoliCrc1KB     7037.58      7392.63      1.05x

This algorithm need 8K lookup table, so it's enabled only for block
larger than 4K.

We can see about 2.6x improvement for IEEE.

Change-Id: I7f786d20f0949245e4aa101d7921669f496ed0f7
Reviewed-on: https://go-review.googlesource.com/1863
Reviewed-by: Russ Cox <rsc@golang.org>
2015-06-18 18:14:24 +00:00
..
adler32 build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
crc32 hash/crc32: speedup crc32 of IEEE using slicingBy8 2015-06-18 18:14:24 +00:00
crc64 build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
fnv build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
hash.go build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
test_cases.txt build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00
test_gen.awk build: move package sources from src/pkg to src 2014-09-08 00:08:51 -04:00