From 05eab84c84394faa96633cfa86fa5a42c1810e2b Mon Sep 17 00:00:00 2001 From: David Oberhollenzer Date: Sun, 16 Feb 2020 02:07:31 +0100 Subject: Replace crc32 with xxhash32 On the one hand, benchmarking and profiling determined xxhash32 to be faster than the zlib implementation of crc32, on the other hand profiling determined that crc32 computation contributed signifficantly to the overall runtime. Signed-off-by: David Oberhollenzer --- lib/sqfs/block_processor/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/sqfs/block_processor/common.c') diff --git a/lib/sqfs/block_processor/common.c b/lib/sqfs/block_processor/common.c index a1e8b6e..a01b5e9 100644 --- a/lib/sqfs/block_processor/common.c +++ b/lib/sqfs/block_processor/common.c @@ -67,7 +67,7 @@ int block_processor_do_block(sqfs_block_t *block, sqfs_compressor_t *cmp, return 0; } - block->checksum = crc32(0, block->data, block->size); + block->checksum = xxh32(block->data, block->size); if (block->flags & (SQFS_BLK_IS_FRAGMENT | SQFS_BLK_DONT_COMPRESS)) return 0; -- cgit v1.2.3