Skip to content

perf(rust): JSON.parse reads a string without escapes in place - #93

Merged
kommander merged 1 commit into
devfrom
perf/stack-10-json-parse
Nov 26, 2026
Merged

kommander merged 1 commit into
devfrom
perf/stack-10-json-parse

Conversation

@hearnadam

Copy link
Copy Markdown
Contributor

The parser made a String for every key and string value. One with no escape is
a slice of the input: a key is interned from it, a short value goes in the
buffer short strings share.


Part 10 of 11 in a stack; based on perf/stack-09-substring. Each part was built, linted and tested on its own (cargo test --release --workspace, the same under PSYCHOSCRIPT_GC_STRESS=1, and the conformance cases under PSYCHOSCRIPT_ROUNDTRIP=1). Numbers are instructions retired, from rust/bench/examples/corpus and mem_probe (part 1).

@hearnadam
hearnadam added this pull request to stack #95 November 26, 2026 17:17
@hearnadam
hearnadam force-pushed the perf/stack-10-json-parse branch from afbd12a to 7062364 Compare November 26, 2026 17:20
@kommander
kommander force-pushed the perf/stack-10-json-parse branch 7 times, most recently from 257aa2e to 67abda9 Compare November 26, 2026 22:57
Base automatically changed from perf/stack-09-substring to dev November 26, 2026 22:58
The parser made a String for every key and string value. One with no escape is
a slice of the input: a key is interned from it, a short value goes in the
buffer short strings share.
@kommander
kommander force-pushed the perf/stack-10-json-parse branch from 67abda9 to bad934c Compare November 26, 2026 22:58
@kommander
kommander merged commit e79ed46 into dev Nov 26, 2026
1 check passed
@kommander
kommander deleted the perf/stack-10-json-parse branch November 26, 2026 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants