code wiki / (root) / sketch_tdigest_v2_vs_v1_bench.nx

sketch_tdigest_v2_vs_v1_bench.nx

buildroot/runtime/sketch_tdigest_v2_vs_v1_bench.nx

4006 B113 linesdepth 5pulls 9 transitivereach 0 importersview sourcekind benchtopic sketch
docsdependenciesstructsconstsfunctions

about

sketch_tdigest_v2_vs_v1_bench.nx -- paired measurement, T-Digest v2 vs v1. CLAIM TO VALIDATE: v2 (Dunning arcsin k1) uses fewer centroids than v1 (simplified parabolic 4q(1-q)) at comparable global accuracy. The memory efficiency is the headline T-Digest property; v2 is supposed to honor it; v1 over-allocates centroids near tails. SHARED WORKLOAD: - Stream: integers 1..2000 in order - Both alloc with delta=100 MEASUREMENT AXES: ACCURACY: median + p10 + p90 errors; both should hit ~1% rank; v2 may be slightly worse (looser tail) but must stay within tolerance band MEMORY: n_centroids_used. v2 < v1 expected. TIME: INCONCLUSIVE (no in-program clock) HARD-WIN GATE: MEMORY axis must BEAT v1 by >5% (50000 ppm). Accuracy on median must be EQUIVALENT (not LOSES).

dependencies 5 imports · 0 importers

syscalls.nx sketch_tdigest.nx sketch_tdigest_v2.nx sketch_comparator.nx sketch_types.nx sketch_tdigest_v2_vs_v1_bench.

imports: syscalls.nxsketch_tdigest.nxsketch_tdigest_v2.nxsketch_comparator.nxsketch_types.nx

imported by: nobody (leaf or entry point)

structs

none

consts

none

functions

30func main() -> i64