Skip to content

⚡ Bolt: Optimize decompression for offset 24#228

Merged
404Setup merged 1 commit intomainfrom
bolt-optimize-offset24-3244999817098573056
Feb 18, 2026
Merged

⚡ Bolt: Optimize decompression for offset 24#228
404Setup merged 1 commit intomainfrom
bolt-optimize-offset24-3244999817098573056

Conversation

@404Setup
Copy link
Copy Markdown
Owner

💡 What: Optimized the decompression hot path for offset == 24 in src/decompress/x86.rs.
🎯 Why: The previous implementation used an alignr chain with loop-carried dependencies, limiting throughput.
📊 Impact: Increases throughput for offset 24 by ~32% (7.73 GiB/s -> 10.20 GiB/s).
🔬 Measurement: Run cargo bench --bench bench_main "Decompress offset24" to verify.


PR created automatically by Jules for task 3244999817098573056 started by @404Setup

Optimized `decompress_bmi2` for `offset == 24` by removing the `alignr` dependency chain.
The pattern for offset 24 repeats every 48 bytes (3 vectors). The implementation now precomputes these 3 vectors (`v1`, `v2`, `v0`) using `unpacklo` and `alignr` and stores them in an unrolled loop.

This breaks the loop-carried dependency found in the previous implementation, allowing better pipelining and ILP.

Benchmarks show a ~32% improvement in throughput for offset 24 decompression.

Co-authored-by: 404Setup <[email protected]>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@404Setup 404Setup merged commit f144779 into main Feb 18, 2026
1 check passed
@404Setup 404Setup deleted the bolt-optimize-offset24-3244999817098573056 branch February 18, 2026 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant