Skip to content

Commit

Permalink
continue optimize.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachelint committed Aug 30, 2024
1 parent 5bb1805 commit c9f0b06
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,9 +473,9 @@ impl BlockedGroupIndex {
let data = raw_index & GROUP_INDEX_DATA_MASK;
let (highs, lows) = ((data >> 32) as u32, data as u32);

let block_id = highs * flag as u32;
let block_id = (highs & (u32::MAX.wrapping_add(1 - flag as u32))) as u32;
let block_offset = {
let offset_high = highs as u64 * (1 - flag);
let offset_high = highs as u64 & (u64::MAX.wrapping_add(flag));
(offset_high << 32) | (lows as u64)
};

Expand Down

0 comments on commit c9f0b06

Please sign in to comment.