perf(runtime): fast-path ordinary native property Get - #10248
proggeramlug wants to merge 2 commits into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (7)
📒 Files selected for processing (33)
Included review availability: Your plan provides up to 8 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughChangesNative property Get optimization
Priority: ⬇️ Low Estimated code review effort: 4 (Complex) | ~45 minutes Change: Refactor Sequence Diagram(s)sequenceDiagram
participant Caller as Reflect or runtime Get caller
participant NativeGet as native_get
participant ExistingGet as existing Get dispatch
Caller->>NativeGet: attempt ordinary data lookup
NativeGet-->>Caller: return data-slot value when eligible
NativeGet->>ExistingGet: fall through for unsupported or unproven cases
ExistingGet-->>Caller: perform existing property-read behavior
Merge Risk: ⚪ Minimal · up to No merge-blocking issue remains identified for this change. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 53.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 32 functions across 15 files. (17 skipped: 17 unsupported.) Full details: Description checkExplanation The description provides detailed implementation, performance, and validation information, but it does not follow the repository template. It omits the required section headings, related issue entry, checklist, and explicit test-plan checklist.
✨ Finishing Touches 💡 2📝 Generate docstrings 💡
🛠️ Fix failing CI checks 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Runtime Get on ordinary objects currently repeats key copies, handle scopes, and exotic/descriptor probes even when it can return an own or prototype data slot without calling JavaScript. Add a conservative classified lookup shared by Reflect.get, the named-field ABI, and the native borrowed-name getter. Reuse a canonical key for JSON.stringify's toJSON lookup. Every unproven case keeps the existing slow path; no new GC roots or raw-pointer caches.
Linux
perf stat -e instructions:u, medians of three runs against main9fda98df68, with pinned Node stdout checks:Baseline measurements preceded runtime edits. Final instruction-sampled DWARF profiles had no lost samples. Build/binary hashes, raw counts, folded stacks, and scope decisions are in the measurement and validation report and its evidence directory.
Validation:
Ready for review and the merge train. The workspace version remains for the train's version-bump commit. GitHub runners are unavailable; the attached local replay is the validation evidence.
Summary by CodeRabbit
Performance
Reflect.get, 12% for positive thenable handling, and 43% for inheritedtoJSONserialization.Bug Fixes
Tests