Refactor decompress_bmi2_ptr for better code health#383
Conversation
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]>
|
👋 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. |
Extracted the monolithic match handling logic from
decompress_bmi2_ptrinsrc/decompress/x86.rsinto a new helper functioncopy_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