⚡ Bolt: Optimize write_match_fast and fix CRC32 benchmark#237
Conversation
Co-authored-by: 404Setup <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
💡 What:
write_match_fastinsrc/compress/mod.rsby combining the bitstream writes for match length and offset when their combined bit count is <= 32. This reduces the number ofbitcountchecks and buffer stores.crc32_slice8benchmark inbenches/bench_main.rsby wrapping the input data instd::hint::black_box.🎯 Why:
crc32_slice8benchmark was reporting impossibly high throughput (27 TiB/s) because the compiler was hoisting the pure function call out of the loop (Loop Invariant Code Motion).black_boxprevents this.📊 Impact:
crc32_slice8benchmark reports realistic numbers (~1.3 GiB/s) for future optimization work.🔬 Measurement:
cargo bench --bench bench_main "Compress/libdeflate-rs XXS Level 1"cargo bench --bench bench_main "CRC32 Slice8"PR created automatically by Jules for task 17350663453863150625 started by @404Setup