sketch_ddsketch_vs_tdigest_tail_bench.nx
buildroot/runtime/sketch_ddsketch_vs_tdigest_tail_bench.nx
about
sketch_ddsketch_vs_tdigest_tail_bench.nx -- multiplicative-error tail.
CLAIM TO VALIDATE:
DDSketch (Masson-Rim-Lee 2019) provides MULTIPLICATIVE relative
error on every quantile: |est/true - 1| <= 1/bpo. T-Digest
provides empirical tail-tight ADDITIVE error. On a HEAVY-TAIL
stream where the tail values span multiple orders of magnitude,
DDSketch's multiplicative guarantee wins on extreme quantiles.
WORKLOAD:
500 small values (in [1, 100]) + 50 huge values (geometric in
[1000, 100000]) -- the heavy tail. Total N=550.
True p99 ~ 60000 (top 1% are the huge values).
True median ~ 50 (middle of small values).
MEASUREMENT:
DDSketch bpo=64 -> rel err 1/64 = 1.56% per quantile.
T-Digest delta=100 -> ~1% global rank error, but at p99 of a
heavy-tail the absolute value error scales with quantile value.
HARD-WIN GATE:
On p99 with truth ~ 60000:
- DDSketch should be within ~2-3% (1000-1500 absolute)
- T-Digest may be much further off due to centroid quantization
at the tail
ACCURACY axis BEATS by >5%.
dependencies 5 imports · 0 importers
imports: syscalls.nxsketch_ddsketch.nxsketch_tdigest.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
| 34 | func iabs_d(x: i64) -> i64 called by 1: main |
| 39 | func main() -> i64 |