Optimize merged evaluation with cooperative parsing and reduced intermediate copying #5426
All Vouch review confidence checks passed
Residual risk 0.20 = Change Risk (0.37) × (1 − Review Confidence (0.47)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 228 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
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
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.325
Real PR Conversation Timeline
1 comments
"Review active on #5426"
general
weight: 0.35
gerashegalov
In
get_json_object, the single-read path keeps its per-row state in a structure that every thread of the row shares. This PR reworks that shared state so threads of the same row cooperate instead of duplicating work: fields already located by one thread are recorded in a form the other threads of the row reuse, so a row with many fields does the search work once rather than once per field.Benchmark
GPU: Quadro RTX 6000 (sm_75), CUDA 13.3.
get_json_object_multiple_paths38 configurations (paths={1, 8, 32, 33, 135}, input={10 MiB, 100 MiB}, row shapes={2 nested layouts}, seeds={1, 2}; two cells skipped on both sides of the comparison because the GPU ran out of memory).
Geomean: 1.26× faster than its base. Single-path rows are unchanged (1.00×); the gain grows with the number of paths per row, reaching 2.09× for 135-path rows.
Top 5 speedups
| Cell (paths · size · scenario · seed) | Speedup |
|---|---|
| 135 paths · 100 MiB · 1 · 2 | 2.09× |
| 135 paths · 100 MiB · 1 · 1 | 2.08× |
| 32 paths · 100 MiB · 1 · 1 | 1.97× |
| 32 paths · 100 MiB · 1 · 2 | 1.95× |
| 33 paths · 100 MiB · 1 · 2 | 1.94× |
get_json_object_path_types48 configurations covering mixed query kinds (list positions, wildcards, and their mixes with plain names) — the route this PR does not change.
Geomean: 1.03× (slightly recovered from the previous PR's small single-record cost).
This PR adds the wide-shape benchmark cells that exercise the merged route (one parent with 150 and with 600 members at 124 paths, two parents at 16 and 64 paths, and 4×200 members at 768 paths). The consolidated 50-cell numbers for the full stack are reported in PR #5427's description.
<img width="1760" height="990" alt="image" src="https://github.com/user-attachments/assets/fb2ad55c-b05f-4f50-b719-aa55a887f825" />