diff options
author | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-02-16 02:07:31 +0100 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@sigma-star.at> | 2020-02-16 02:07:31 +0100 |
commit | 05eab84c84394faa96633cfa86fa5a42c1810e2b (patch) | |
tree | c7f1783975339287f81270c2fe906ded1e058ac2 /lib/sqfs/block_processor/common.c | |
parent | 81f9ddf58b4024d51b24123788c860bb08a85b04 (diff) |
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 <david.oberhollenzer@sigma-star.at>
Diffstat (limited to 'lib/sqfs/block_processor/common.c')
-rw-r--r-- | lib/sqfs/block_processor/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |