diff --git a/bitpacker/src/bitpacker.rs b/bitpacker/src/bitpacker.rs index a6bc998d2..0b8d951e4 100644 --- a/bitpacker/src/bitpacker.rs +++ b/bitpacker/src/bitpacker.rs @@ -17,6 +17,7 @@ impl BitPacker { } } + #[inline] pub fn write( &mut self, val: u64, @@ -79,6 +80,7 @@ impl BitUnpacker { } } + #[inline] pub fn get(&self, idx: u64, data: &[u8]) -> u64 { if self.num_bits == 0 { return 0u64; diff --git a/bitpacker/src/blocked_bitpacker.rs b/bitpacker/src/blocked_bitpacker.rs index 1fa142b21..dc53d0fb1 100644 --- a/bitpacker/src/blocked_bitpacker.rs +++ b/bitpacker/src/blocked_bitpacker.rs @@ -80,6 +80,7 @@ impl BlockedBitpacker { * std::mem::size_of_val(&self.buffer.get(0).cloned().unwrap_or_default()) } + #[inline] pub fn add(&mut self, val: u64) { self.buffer.push(val); if self.buffer.len() == BLOCK_SIZE as usize { @@ -122,6 +123,7 @@ impl BlockedBitpacker { .resize(self.compressed_blocks.len() + 8, 0); // add padding for bitpacker } } + #[inline] pub fn get(&self, idx: usize) -> u64 { let metadata_pos = idx / BLOCK_SIZE as usize; let pos_in_block = idx % BLOCK_SIZE as usize;