1
0
mirror of https://github.com/golang/go synced 2024-11-18 05:04:47 -07:00
go/src/hash
Klaus Post 2027b00e63 hash/crc32: add AMD64 optimized IEEE CRC calculation
IEEE is the most commonly used CRC-32 polynomial, used by zip, gzip and others.

Based on http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-generic-polynomials-pclmulqdq-paper.pdf

benchmark                       old ns/op     new ns/op     delta
BenchmarkIEEECrc1KB-8           3193          352           -88.98%
BenchmarkIEEECrc4KB-8           5025          1307          -73.99%
BenchmarkCastagnoliCrc1KB-8     126           126           +0.00%

benchmark                       old MB/s     new MB/s     speedup
BenchmarkIEEECrc1KB-8           320.68       2901.92      9.05x
BenchmarkIEEECrc4KB-8           815.08       3131.80      3.84x
BenchmarkCastagnoliCrc1KB-8     8100.80      8109.78      1.00x

Change-Id: I99c9a48365f631827f516e44f97e86155f03cb90
Reviewed-on: https://go-review.googlesource.com/14080
Reviewed-by: Keith Randall <khr@golang.org>
2015-09-16 15:42:42 +00:00
..
adler32 hash/*: document the byte order used by the Sum methods 2015-09-10 03:34:23 +00:00
crc32 hash/crc32: add AMD64 optimized IEEE CRC calculation 2015-09-16 15:42:42 +00:00
crc64 hash/*: document the byte order used by the Sum methods 2015-09-10 03:34:23 +00:00
fnv hash/*: document the byte order used by the Sum methods 2015-09-10 03:34:23 +00:00
hash.go
test_cases.txt
test_gen.awk