sketch_reqsketch_vs_kll_bench.nx
buildroot/runtime/sketch_reqsketch_vs_kll_bench.nx
about
sketch_reqsketch_vs_kll_bench.nx -- MATCHED-MEMORY paired measurement.
HONESTY UPDATE (matched-memory rerun):
Original bench used same k=64 for both; that gave ReqSketch
~3x memory (24 levels × 2*k = 3072 slots vs KLL 16 × k = 1024).
This rerun MATCHES TOTAL SLOT COUNT: ReqSketch k=64 (3072 slots)
vs KLL k=192 (16 × 192 = 3072 slots). Loser scaled UP, not winner
nerfed down -- per substrate-honesty discipline.
SHARED WORKLOAD:
- Stream: integers 1..1000 in order
- Slot budget: 3072 (matched)
- Seed: deterministic, identical for both
- Query: p99 -- the tail quantile where ReqSketch hra=1 should
structurally beat KLL's uniform-eps bound EVEN AT MATCHED MEMORY
(the structural-tail-preservation claim of Cormode et al. 2021).
GROUND TRUTH:
p99 of 1..1000 = 990
VERDICT REQUIREMENTS (honest, matched memory):
ACCURACY p99 -> BEATS or EQUIVALENT (structural claim survives)
ACCURACY p999 -> BEATS (gap should widen at deeper tail)
ACCURACY p50 -> NOT BEATS (KLL's uniform bound holds at median)
MEMORY -> EQUIVALENT by construction (matched slot count)
dependencies 5 imports · 0 importers
imports: syscalls.nxsketch_reqsketch.nxsketch_kll.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
structs
| none |
consts
| none |
functions
| 33 | func iabs_b(x: i64) -> i64 |
| 38 | func main() -> i64 |