← Back to Pull requests

Optimize merged evaluation with cooperative parsing and reduced intermediate copying #5426

Open
unknown opened this pull request with 228 lines diff across 2 files
View on GitHub
unknown unknown commented on Nov 11, 2026 17:07 UTC
Author

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_paths

38 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_types

48 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" />

Diff: 228 lines (+171 / -57) across 2 files Reviewer: gerashegalov Review duration: 34108m
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
0.37
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
0.02
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
46%
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
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
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 46.7% 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: 37.0% (MEDIUM) · Higher = larger blast radius
37.0%
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: 46.7% · Lower = rushed or shallow review
46.7%
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: 19.7% · Safe to merge
19.7%