code wiki / (root) / sketch_hll4_test.nx

sketch_hll4_test.nx

buildroot/runtime/sketch_hll4_test.nx

3980 B111 linesdepth 7pulls 12 transitivereach 0 importersview sourcekind gate/prooftopic sketch
docsdependenciesstructsconstsfunctions

about

sketch_hll4_test.nx -- HLL_4 + Heule exception table verification. Tests: 1. Memory: HLL_4-10 register array < HLL_8-10 by ~50% 2. Cardinality estimate within +-15% of N=5000 (no exceptions fire at this cardinality since max rho ~= log2(5000/1024) = 2.3) 3. Exception path: directly write rho=20 to a slot; verify read-back returns 20, slot's packed nibble holds sentinel 15, exception count incremented 4. Multiple exceptions: add three different (idx, value) entries, verify each reads back correctly without interference 5. Exception update: overwrite existing exception slot, count should NOT increment 6. Typed envelope: NX_ENV_REL_STDDEV / ReferenceImpl / Honest

dependencies 3 imports · 0 importers

syscalls.nx sketch_hll4.nx sketch_types.nx sketch_hll4_test.nx

imports: syscalls.nxsketch_hll4.nxsketch_types.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main nx_hll4_alloc write_i64_le nx_hll4_add murmur3_32 mm_load_u32_le mm_rotl32 nx_clz32 nx_bits_clz32 nx_hll4_read nx_hll4_get_packed nx_hll4_except_find nx_hll4_write nx_hll4_set_packed nx_hll4_except_set nx_hll4_except_find ↻ nx_hll4_estimate nx_hll4_read ↻ nx_hll_pow2_neg_q32 nx_hll_alpha_m_sq_q64 nx_hll4_exception_count nx_hll4_write ↻ nx_hll4_read ↻ nx_hll4_get_packed ↻ nx_hll4_query nx_hll4_estimate ↻ nx_hll_stddev_rel_ppb nx_approx_new

structs

none

consts

none

functions

20func write_i64_le(buf: *u8, value: i64) -> i64 {
called by 1: main
27func main() -> i64 {