Verified latency benchmarks
Per-request release measurements for typical, clean and secret-dense workloads.
Summary
Measured per request in release with 20,000 samples per scenario:
| Scenario | P50 | P95 | P99 |
|---|---|---|---|
| Typical ~2 KB prompt | 0.0216 ms | 0.0301 ms | 0.0466 ms |
| Clean 64 KB text | 0.415 ms | 0.465 ms | 0.699 ms |
| Secret-dense 8 KB content | 0.875 ms | 1.148 ms | 1.499 ms |
| Secret-dense 64 KB content | measured separately | 7.75 ms | 10.4 ms |
The typical prompt is the dominant workload. Secret-saturated payloads are deliberately adversarial: they trigger many rules and validators per byte.
Methodology
The source is masking_engine/benches/latency_percentiles.rs in the Rust program. Each request is timed with Instant, 2,000 warm-up iterations are discarded, and 20,000 samples are sorted to calculate P50, P95 and P99 using nearest-rank.
cargo bench --bench latency_percentiles -- --nocapture
Results depend on CPU, operating system and binary version. These figures come from a release build run on July 10, 2026.
How to read the numbers
We do not publish “sub-2 ms” as a universal guarantee. On a typical workload, measured overhead is a few hundredths of a millisecond. Clean text up to 64 KB reached 0.465 ms P95. Secret-dense content costs more, so that workload is shown explicitly instead of being hidden behind a headline number.