MCPcopy Create free account
hub / github.com/argumentcomputer/ix / hash_g_slice

Function hash_g_slice

crates/aiur/src/querymap.rs:19–26  ·  view source on GitHub ↗
(key: &[G])

Source from the content-addressed store, hash-verified

17}
18
19fn hash_g_slice(key: &[G]) -> u64 {
20 use std::hash::Hasher;
21 let mut h = rustc_hash::FxHasher::default();
22 for g in key {
23 h.write_u64(g.as_canonical_u64());
24 }
25 h.finish()
26}
27
28/// Entries per storage segment (2^20). Segments are fixed-size, so growth
29/// never reallocates or copies: appending past a segment boundary just

Callers 2

get_index_ofMethod · 0.85
insertMethod · 0.85

Calls 1

finishMethod · 0.45

Tested by

no test coverage detected