JSON · median TBM
4.06 µs10,263-schema paired publication run.
JavaScript · median TBM
40.9 µs31 tuned fixtures, 4,099 token steps.
JSON Schema
The paired JSON Schema Bench run covered 10,263 schemas and just over three million timed token steps per framework. TBM is per-step mask-and-commit time.
| system | median | mean | p99 | p99.9 | max |
|---|---|---|---|---|---|
| GLRMask | 4.06 µs | 4.52 µs | 12.8 µs | 20.7 µs | 144 µs |
| llguidance | 14.7 µs | 27.1 µs | 259 µs | 964 µs | 7.80 ms |
That table is specifically about the repeated runtime. Time to the first mask, including compilation, goes strongly the other way.
JavaScript
JavaScript leaves more lexer/parser work on an online decoder. On the 31-fixture tuned corpus, GLRMask's runtime remains in the tens of microseconds while the comparison system is in the millisecond range.
| system | median | mean | p99 | p99.9 | max |
|---|---|---|---|---|---|
| GLRMask | 40.9 µs | 50.4 µs | 192 µs | 306 µs | 497 µs |
| llguidance | 1.05 ms | 1.17 ms | 3.28 ms | 3.83 ms | 4.13 ms |
A smaller direct grammar-shape experiment also gave both systems the same generic js.ebnf. GLRMask's median moved from 50.6 µs to 127 µs; llguidance's moved from 1.60 ms to 21.6 ms. That comparison is about sensitivity to grammar representation, not just absolute throughput.
Compilation
Compilation is deliberately not hidden. On the published JSON run, GLRMask's time to first mask measured 23.8 ms median, 780 ms p99, and 5.11 s maximum; llguidance started much faster. The JavaScript grammars in that publication were more extreme: GLRMask compilation was on the order of tens of seconds on the M1 Pro used for those measurements.
GLRMask spends more time once so that later token steps have less grammar/tokenizer/parser structure to discover. The right comparison depends on how often the compiled artifact is reused.
How to interpret the numbers
Use the runtime numbers when the constraint is reusable. They describe the cost that repeats for every generated token and every request that shares the compiled artifact.
Use total startup + runtime when the constraint is one-off. A fresh JSON Schema used for one short request can favor a decoder with tiny startup cost even if its per-token mask is slower.
Aggregate percentiles also hide where individual slow token boundaries appear. The token-by-token investigation shows real JSON and JavaScript inputs with each model token colored by its measured TBM.