stleary/JSON-java: −25.1% ns/op on its benchmarks, slower on other inputs
REGRESSED
not sent upstream
HEADLINE
−25.1% ns/op
geomean over four JMH benchmarks, which the run wrote itself
REGRESSION
slower
Escape-heavy strings got 10–64% slower when re-measured on current upstream on 2026-11-03. The benchmarks missed these inputs.
before → after
bar length is relative to the before valuefour JMH benchmarks−25.1%
what changed
JSONObject.quote writes runs of ordinary characters in one call. JSONTokener and XML.toJSONObject read a String through a non-synchronizing Reader. The write path scans the JSON number grammar instead of matching a regex per number. All four kept changes at once measure −26.1% on the same four benchmarks.
10 experiments
4
kept
5
discarded
1
failed
note — the harness kept these changes because they passed on the benchmarks it had. The library ships no benchmarks, so the run wrote them. A slowdown on any real input counts as a failed optimization, so this run is marked regressed.
how it was measured
- tool
JMH- rounds
- 10 interleaved rounds per side
- verdict rule
- KEEP needs p < 0.05/4 = 0.0125 with four benchmarks.
LIMITS
Results hold only for the benchmarks a run measures. Inputs they do not cover can get slower. Check your hot paths before you merge.