1
0
Mirror von https://github.com/tkuschel/bees.git synchronisiert 2026-06-19 15:07:54 +02:00

Make crc64 go faster

The current crc64 algorithm is a variant of the Redis implementation.
Change it to a variant of the Adler implementation as described
at https://matt.sh/redis-crcspeed

Test program at https://github.com/PeeJay/crc64-compare
Filesize: 1.1G
Asking crc64-redis to sum "/media/peejay/BTRFS/1/ubuntu-14.04.5-desktop-amd64.iso"...
Asking crc64-adler to sum "/media/peejay/BTRFS/1/ubuntu-14.04.5-desktop-amd64.iso"...
Redis CRC-64: f971f9ac6c8ba458
Adler CRC-64: f971f9ac6c8ba458
Adler throughput: 1659.913308 MB/s
Redis throughput: 437.284661 MB/s
Adler is 3.79x faster than Redis

Signed-off-by: Paul Jones <paul@pauljones.id.au>
Dieser Commit ist enthalten in:
Paul Jones
2016-12-13 12:41:10 +11:00
Ursprung f5f4d69ba3
Commit 8abdeabddc
2 geänderte Dateien mit 74 neuen und 19 gelöschten Zeilen
+1
Datei anzeigen
@@ -3,6 +3,7 @@
#include <cstdint>
#include <cstdlib>
#include <cstring>
namespace crucible {
namespace Digest {