Repository navigation
deps: replace simdjson with jsonifier - #67620
Closed
RealTimeChris wants to merge 1 commit into
Closed
RealTimeChris wants to merge 1 commit into
RealTimeChris wants to merge 1 commit into
Conversation
deps: replace simdjson with jsonifier Replace the bundled simdjson with Jsonifier for every internal JSON parse: package.json reading in the module loader, node.config.json, SEA configs, snapshot and inspector profile data, and the task runner. All callers now go through a small parser-agnostic interface in src/node_json.h, so no file under src/ includes Jsonifier headers and no ISA-specific code leaks into the rest of the binary. simdjson is removed along with its configure options (--shared-simdjson*), its updater script, its LICENSE entry and its nix and GN references. tools/dep_updaters/update-jsonifier.sh replaces the updater, and process.versions.jsonifier reports the bundled version. Parse error messages for SEA configs now name the file and the Jsonifier error code, and the affected tests are updated to match. Assisted-by: Claude Signed-off-by: RealTimeChris <40668522+RealTimeChris@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. |
Member
Author
2 of 3 tasks
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 the bundled simdjson with Jsonifier
(https://github.com/nihilai-collective/Jsonifier) for Node's internal JSON
parsing.
What changes
node.config.json, SEA config, snapshot and inspector profile data,node --run) go through a new parser-agnostic interface,src/node_json.h. Nothing undersrc/includes Jsonifier headers.deps/simdjsonis removed, together with--shared-simdjson*,update-simdjson.sh, and its LICENSE, nix and GN entries.tools/dep_updaters/update-jsonifier.shis added, andprocess.versions.jsonifieris exposed.Cannot parse JSON from <file>: <code>; the SEA tests are updated.test/parallel/test-package-json-parse.js. New benchmarks:benchmark/module/package-json-parse.jsandbenchmark/module/package-json-corpus.js.Performance
Measured with
benchmark/compare.js(30 runs, Welch's t-test), old =upstream with simdjson 5.1.1, new = this branch. The corpus benchmark
parses every unique package.json under
deps/, bucketed by size:********************************************************************Confidence (Welch's t-test):
*p < 0.05,**p < 0.01,***p < 0.001.Positive means Jsonifier is faster than simdjson 5.1.1.
The one regression is Windows 512-1024 B, which I am still
investigating. The Linux GCC AVX2 run was too noisy to report and will
be rerun.
Notes for reviewers
--shared-simdjsonlose that option. Happyto add
--shared-jsonifierif wanted.Portions of this change were written with AI assistance (Claude) and
reviewed by me.