← Back to Pull requests

src: reserve simdjson padding in parsePackageJSON #67623

Closed
unknown closed this pull request without merging on Nov 22, 2026 20:49 UTC
View on GitHub
unknown unknown commented on Nov 19, 2026 18:33 UTC
Author

The parsePackageJSON() function copies its input into a std::string with no spare
capacity. The simdjson::pad() function then appends SIMDJSON_PADDING spaces.
This change reserves room for the padding when the input is copied, so the append happens in
place.

This adds benchmark/module/parse-package-json.js, which parses the
unique package.json files under deps/, grouped by file size.

Benchmarks

benchmark/compare.js, 30 runs, old = main (108cbef0df), new = this PR,
Welch's t-test.

Intel Xeon Gold 6548N (Emerald Rapids), Linux, clang 23:

                                                    confidence  improvement  accuracy (*)    (**)   (***)
module/parse-package-json.js n=1000000 size='0-512'        ***        6.94 %       ±0.84%  ±1.13%  ±1.47%
module/parse-package-json.js n=1000000 size='512-1024'     ***        9.98 %       ±2.55%  ±3.39%  ±4.41%
module/parse-package-json.js n=1000000 size='1024-2048'    ***        9.97 %       ±3.00%  ±3.99%  ±5.20%
module/parse-package-json.js n=1000000 size='2048+'         **        6.72 %       ±4.83%  ±6.43%  ±8.37%

Intel Xeon Gold 6338 (Ice Lake), Linux, clang 23:

                                                    confidence  improvement  accuracy (*)    (**)   (***)
module/parse-package-json.js n=1000000 size='0-512'        ***        5.52 %       ±0.43%  ±0.58%  ±0.76%
module/parse-package-json.js n=1000000 size='512-1024'     ***       11.12 %       ±0.37%  ±0.49%  ±0.64%
module/parse-package-json.js n=1000000 size='1024-2048'    ***       11.48 %       ±0.41%  ±0.54%  ±0.70%
module/parse-package-json.js n=1000000 size='2048+'        ***        9.42 %       ±0.35%  ±0.46%  ±0.60%

Apple M4 Max, macOS, Apple clang 17:

                                                    confidence  improvement  accuracy (*)    (**)   (***)
module/parse-package-json.js n=1000000 size='0-512'        ***       10.13 %       ±0.98%  ±1.30%  ±1.69%
module/parse-package-json.js n=1000000 size='512-1024'     ***        9.52 %       ±0.77%  ±1.03%  ±1.34%
module/parse-package-json.js n=1000000 size='1024-2048'    ***        9.97 %       ±0.84%  ±1.12%  ±1.46%
module/parse-package-json.js n=1000000 size='2048+'        ***        8.83 %       ±0.78%  ±1.04%  ±1.35%

Refs: https://github.com/nodejs/node/issues/55584
Refs: https://github.com/nodejs/node/pull/55591
Refs: https://github.com/nodejs/node/pull/67620

Diff: 302 lines (+226 / -76) across 3 files Reviewer: anonrig Review duration: 4456m
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 302 lines diff across 3 files
0.40
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
60%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.342
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #67623"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 60.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 40.1% (MEDIUM) · Higher = larger blast radius
40.1%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 60.5% · Lower = rushed or shallow review
60.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 15.8% · Safe to merge
15.8%
Repository