MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / num_collisions

Method num_collisions

crates/table/src/pointer_map.rs:175–177  ·  view source on GitHub ↗

The number of colliding hashes in the map. If two hashes collide then this counts as 2.

(&self)

Source from the content-addressed store, hash-verified

173 ///
174 /// If two hashes collide then this counts as 2.
175 pub fn num_collisions(&self) -> usize {
176 self.colliders.iter().map(|a| a.len()).sum()
177 }
178
179 /// The number hashes that do not collide.
180 pub fn num_non_collisions(&self) -> usize {

Callers 1

lenMethod · 0.80

Calls 4

iterMethod · 0.65
sumMethod · 0.45
mapMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected