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

Method insert

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

Source from the content-addressed store, hash-verified

28 }
29
30 fn insert(&mut self, value: u32) {
31 let index = self.get_bucket_index(value);
32 let bit_position = self.custom_bit_mapping(value);
33
34 self.buckets[index] |= 1u128 << bit_position;
35 }
36
37 fn is_member(&self, value: u32) -> bool {
38 let index = self.get_bucket_index(value);

Callers 4

benchmark_insertFunction · 0.45
benchmark_hashset_insertFunction · 0.45
benchmark_lookupFunction · 0.45
benchmark_hashset_lookupFunction · 0.45

Calls 2

get_bucket_indexMethod · 0.80
custom_bit_mappingMethod · 0.80

Tested by

no test coverage detected