code wiki / (root) / bench_hll_vs_cpc.nx

bench_hll_vs_cpc.nx

buildroot/runtime/bench_hll_vs_cpc.nx

2747 B77 linesdepth 6pulls 14 transitivereach 0 importersview sourcekind benchtopic bench
docsdependenciesstructsconstsfunctions

about

bench_hll_vs_cpc.nx -- head-to-head workload runner. Streams N distinct synthetic keys through OUR HLL_8 and OUR CPC at matched lg_k, then feeds estimates + memory into the comparator for a sealed verdict. This is sister-comparison (our vs our), validating Lang 2017's HIP claim that CPC beats HLL on accuracy at same memory. The harness extends naturally: swap CPC for a Python-datasketches stub to compare against the incumbent.

dependencies 5 imports · 0 importers

syscalls.nx sketch_hll.nx sketch_cpc.nx sketch_comparator.nx sketch_types.nx bench_hll_vs_cpc.nx

imports: syscalls.nxsketch_hll.nxsketch_cpc.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 nx_cpc_alloc nx_hmap_alloc nx_hmap_is_pow2 nx_hll_add murmur3_32 mm_load_u32_le mm_rotl32 nx_clz32 nx_bits_clz32 nx_cpc_add nx_cpc_coupon murmur3_32 ↻ nx_cpc_clz32 nx_bits_clz32 ↻ nx_hmap_has nx_hmap_probe_find nx_hmap_hash nx_hmap_entry_at nx_hmap_size nx_hmap_put nx_hmap_probe_insert nx_hmap_hash ↻ nx_hmap_entry_at ↻ nx_hmap_entry_at ↻ nx_cpc_hip_add 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

structs

none

consts

none

functions

18func main() -> i64 {