Skip to content

Refactor decompress_bmi2_ptr for better code health#383

Merged
404Setup merged 1 commit intomainfrom
refactor-decompress-bmi2-ptr-4720961271060890389
Feb 24, 2026
Merged

Refactor decompress_bmi2_ptr for better code health#383
404Setup merged 1 commit intomainfrom
refactor-decompress-bmi2-ptr-4720961271060890389

Conversation

@404Setup
Copy link
Copy Markdown
Owner

Extracted the monolithic match handling logic from decompress_bmi2_ptr in src/decompress/x86.rs into a new helper function copy_match_bmi2. This function encapsulates the complex offset dispatching and SIMD operations, making the main decompression loop cleaner and easier to understand. The refactor preserves all existing logic and performance characteristics, as verified by the test suite.


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

Extracted the match copying logic from `decompress_bmi2_ptr` into a new
helper function `copy_match_bmi2`. This significantly reduces the size
and complexity of the main decompression loop, improving readability
and maintainability. The helper function retains the `unsafe` block
and `#[target_feature]` attributes to ensure correct SIMD code generation.
Removed `#[inline(always)]` from the helper to comply with compiler
stability rules for target features.

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 3e5bb8a into main Feb 24, 2026
1 check passed
@404Setup 404Setup deleted the refactor-decompress-bmi2-ptr-4720961271060890389 branch February 24, 2026 13:46
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