code wiki / (root) / bench_hll_vs_cpc.nx

bench_hll_vs_cpc.nx

buildroot/runtime/bench_hll_vs_cpc.nx

2747 B77 linesdepth 6pulls 16 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 sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ nx_cpc_alloc nx_hmap_alloc nx_hmap_is_pow2 sys_mmap ↻ sys_mmap ↻ 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

structs

none

consts

none

functions

18func main() -> i64 {