Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 35% faster decompression with less boundary check (#41)
Hi SpiralDB devs! First of all, thank you for implementing the great FSST library! While profiling a decompression workload, I noticed we have some unintended boundary checks that could be removed to improve decompression throughput by 35%, as shown in the `decompress` benchmark below. Removing those boundary checks requires more unsafe code, I've mannually annotated their correctness, but please double check! cc @alamb who might be interested ``` cargo bench --bench micro decompress Compiling fsst-rs v0.4.2 (/home/hao/coding/fsst) Finished `bench` profile [optimized] target(s) in 0.86s Running benches/micro.rs (target/release/deps/micro-bf2c70cedbbe0467) Gnuplot not found, using plotters backend cf=8/decompress time: [47.687 µs 47.725 µs 47.768 µs] thrpt: [20.444 GiB/s 20.462 GiB/s 20.478 GiB/s] change: time: [-26.409% -26.311% -26.208%] (p = 0.00 < 0.05) thrpt: [+35.517% +35.705% +35.887%] Performance has improved. Found 11 outliers among 100 measurements (11.00%) 6 (6.00%) high mild 5 (5.00%) high severe ``` --------- Co-authored-by: Andrew Duffy <[email protected]>
- Loading branch information