Repository navigation
Conversation
Backport the JSON portions of V8 d4966a986bbe, including the parser prerequisite 2990d03d9851, unaligned reads from fc3551409efe and capped Highway tags from 7e56c4c6066f. Omit the general mixed-width string comparison change. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
|
Review requested:
|
Contributor
|
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. |
Resume vector scanning after a clean run. Avoid empty copies and use the known encoded widths for JSON escape table entries. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Limit scalar recovery to gaps below half a vector so a quote every eight UTF-16 code units does not keep the stringifier in scalar mode. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep the v26 parser unchanged rather than trade dense-escape parsing regressions for sparse-input throughput. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Backport only the fast two-byte
JSON.stringifypath from V8 d4966a98, including the applicable unaligned-load and Highway fallback changes. The local follow-up avoids overlapping vector scans around adjacent escapes. The remaining changes are the V8 embedder version bump and one functional mjsunit test for boundaries, escapes and surrogate handling.Parser explicitly excluded: dense-escape parsing regressed in earlier combined builds. We do not have evidence that this case is sufficiently uncommon to accept the regression. Both parser source and header match the v26.x-staging base; no decoder selector or parser performance claim is included.
Split-build validation (ThinLTO, no PGO): On Snapdragon X2 Elite, using the v26.13.1 verification build, median paired object-property stringify throughput was 2.53x stock for unescaped CJK and 1.24x for mixed escapes. With a quote every eight code units it was 0.954x stock (only two of six rounds faster); the earlier gain at this spacing did not replicate. Short bare-string Arm probes also flagged possible clean CJK and Latin-1 losses. The three Arm application comparisons did not bound regressions to 1%.
The native Windows x64 run built the exact split head and passed the functional test. On AMD EPYC 9V74, median paired bare-string throughput was 0.998x–1.009x stock across six shapes. This did not test the object-property cases or establish an application-wide speedup. Keeping the PR draft pending resolution of the Arm signals, matched x64 object-property measurements, release-equivalent PGO and review.