Repository navigation
docs(decisions): turn down the I-JSON string scan change, keep its tests - #361
Open
simonvanlierde wants to merge 1 commit into
Open
simonvanlierde wants to merge 1 commit into
simonvanlierde wants to merge 1 commit into
Conversation
The I-JSON scan from #350 was faster on CJK, strings.json and twitter, but 4 KB strings with one early accent got 16 to 26% slower, and every way to fix that made plain JSON or JSON5 slower beyond noise. - ADR 0004 records the change and the four variants under "Turned down", with the exponent pre-check entry from the same branch. - tests/cases.rs keeps the noncharacter-at-every-position and number overflow cases; they pass on the current scanner. - scripts/bench.py and `just compare` gain strings-accent.json, the case that showed the slowdown. Signed-off-by: Simon van Lierde <90462640+simonvanlierde@users.noreply.github.com>
|
Playground screenshots for 5c56d7e, desktop and phone in light and dark: download the zip (kept 14 days). |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces #350. Its I-JSON string scan was faster on CJK, strings.json and twitter, but 4 KB strings with one early accent got 16 to 26% slower. All four ways I tried to fix that made plain JSON or JSON5 slower beyond noise, so ADR 0004 rules it out.
tests/cases.rskeeps perf(parser): skip non-ASCII bytes below 0xEF in I-JSON strings #350's noncharacter-at-every-position and number overflow tests. They pass on the current scanner.scripts/bench.pyandjust comparegainstrings-accent.json, the case that showed the slowdown.Tested:
cargo nextest run -p jsonvet -p jsonvet-cli(664 passed), ruff andjust --fmt --checkon the bench files. Timings: hyperfine -N on an idle 32-core node, core 2, 30 runs, main first and main last, medians against 2σ.Not checked: nothing.