systemd / casync

Content-Addressable Data Synchronization Tool
1.49k stars 117 forks source link

cachunker: don't scan bytes we can't break on #258

Closed edef1c closed 1 year ago

edef1c commented 2 years ago

The first c->chunk_size_min - CA_CHUNKER_WINDOW_SIZE bytes don't contribute to the result, so we don't need to hash them. This improves chunker throughput by about 16% (216 MiB/s -> 250MiB/s) in my benchmarks.