MCPcopy Create free account
hub / github.com/cosdata/cosdata / is_member

Method is_member

org/src/performant_fixed_set.rs:37–42  ·  view source on GitHub ↗
(&self, value: u32)

Source from the content-addressed store, hash-verified

35 }
36
37 fn is_member(&self, value: u32) -> bool {
38 let index = self.get_bucket_index(value);
39 let bit_position = self.custom_bit_mapping(value);
40
41 (self.buckets[index] & (1u128 << bit_position)) != 0
42 }
43}
44
45fn benchmark_insert(total_elements: usize) -> std::time::Duration {

Callers 1

benchmark_lookupFunction · 0.45

Calls 2

get_bucket_indexMethod · 0.80
custom_bit_mappingMethod · 0.80

Tested by

no test coverage detected