code wiki / (root) / sketch_hll_lgk12_vs_lgk8_bench.nx

sketch_hll_lgk12_vs_lgk8_bench.nx

buildroot/runtime/sketch_hll_lgk12_vs_lgk8_bench.nx

3841 B112 linesdepth 6pulls 12 transitivereach 0 importersview sourcekind benchtopic sketch
docsdependenciesstructsconstsfunctions

about

sketch_hll_lgk12_vs_lgk8_bench.nx -- validates bits-up cap raise. SUBSTRATE FACT TO VALIDATE: NX_HLL_LGK_MAX raised from 10 to 12 this session. Adds alpha_m_sq_q64 entries for lg_k=11, 12 + Heule thresholds. Higher lg_k gives exponentially more registers (m = 2^lg_k) and tighter rel-stddev (1.04 / sqrt(m)). lg_k=8: m=256, rel stddev = 1.04/16 = 6.5% lg_k=12: m=4096, rel stddev = 1.04/64 = 1.6% (4x tighter) WORKLOAD: 100,000 distinct keys streamed into both sketches. Truth = 100,000. MEASUREMENT: ACCURACY axis: closer to truth wins. At matched-seed input, lg_k=12 should beat lg_k=8. HARD-WIN GATE: ACCURACY BEATS by >2x improvement.

dependencies 4 imports · 0 importers

syscalls.nx sketch_hll.nx sketch_comparator.nx sketch_types.nx sketch_hll_lgk12_vs_lgk8_bench

imports: syscalls.nxsketch_hll.nxsketch_comparator.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_hll_alloc write_bh nx_hll_add murmur3_32 mm_load_u32_le mm_rotl32 nx_clz32 nx_bits_clz32 nx_hll_estimate nx_hll_pow2_neg_q32 nx_hll_alpha_m_sq_q64 nx_hll_bias_table_n nx_hll_bias_table_get nx_hll_bias_lgk4 nx_hll_bias_lgk5 nx_hll_bias_lgk6 nx_hll_bias_lgk7 nx_hll_bias_lgk8 nx_hll_bias_lgk9 nx_hll_bias_lgk10 nx_hll_log2_ppm nx_hll_bias_correct nx_hll_bias_table_n ↻ nx_hll_bias_table_get ↻ nx_mulshl_div_i64 nx_i128_alloc nx_i128_mul_i64 nx_i128_mul_u64 nx_i128_neg nx_i128_shl nx_i128_div_i64 nx_i128_is_neg nx_i128_neg ↻ nx_i128_udiv_u64 iabs_hl nx_cmp_accuracy nx_cmp_iabs nx_hll_query nx_hll_estimate ↻

structs

none

consts

none

functions

28func iabs_hl(x: i64) -> i64
called by 1: main
33func write_bh(buf: *u8, value: i64) -> i64
called by 1: main
44func main() -> i64