Skip to content

perf(object): retain owner proofs through own-property reads - #12063

Merged
proggeramlug merged 1 commit into
mainfrom
perf-own-read-proofs
Oct 5, 2026
Merged

proggeramlug merged 1 commit into
mainfrom
perf-own-read-proofs

Conversation

@proggeramlug

@proggeramlug proggeramlug commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Refs #10769

Keeps proofs that are already established alive through own-property reads:

  • Scalar reads: a scalar read of a local or this receiver keeps its Number proof, so the loop does plain arithmetic instead of coercing and checking each value.
  • Loop polls: a region loop's back edge drops its GC poll only when every fast body is verified noncollecting.
  • Runtime named reads: a named read in the runtime keeps the canonical key word and asks the receiver's live shape for a plain inline own slot before the generic walk.

There is no new table, cache, registry or latch. Descriptor, exotic, private, indexed and spilled cases keep the existing fallback.

Instructions per op, main → head (node in brackets):

  • this: 31 → 11 (13)
  • local: 40 → 8 (15)
  • modconst: 11 → 11 (32)
  • param: 11 → 11 (9.4)

Real programs, paired n=5 medians, instructions in billions, main → head. Output matches node on every program.

program instructions RSS KiB
tsc 10.0997 → 10.0928 220512 → 220320
Zod ×5000 16.1411 → 16.0550 57024 → 57336
qs parse 29.0117 → 28.8294 57724 → 58028
qs stringify 77.3799 → 77.1463 63800 → 61924
commander 7.8097 → 7.7976 54536 → 55196
fastify 115.0468 → 115.0393 384428 → 383804

Tests:

  • Runtime, HIR and codegen unit tests: 0 new failures.
  • Area sweep: 255 cases with 0 regressions, plus a new gap test.
  • Two sabotages each turn the new tests red.

Carry whole-write Number facts through scalar reads and verify emitted loop collection effects before omitting polls. Guard invariant local bounds with a strict Number entry test.

Preserve canonical key identity and reuse the receiver live shape for own data slots and the first generic receiver walk. Add semantics and proof-retirement tests with a pending changelog fragment for #10769.
@coderabbitai

coderabbitai Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ad6adbb8-05cd-472c-a270-40e8d6f8a70b
📥 Commits

Reviewing files that changed from the base of the PR and between 8ff0761 and 4ad8aa1.

📒 Files selected for processing (21)
  • changelog.d/PENDING-10769-own-read-proof.md
  • crates/perry-codegen/src/expr/property_get.rs
  • crates/perry-codegen/src/expr/property_set.rs
  • crates/perry-codegen/src/expr/region_array_loop_tests.rs
  • crates/perry-codegen/src/expr/region_loop_tests.rs
  • crates/perry-codegen/src/expr/shadow_slot.rs
  • crates/perry-codegen/src/loop_purity.rs
  • crates/perry-codegen/src/rooting/temp_root.rs
  • crates/perry-codegen/src/stmt/loops.rs
  • crates/perry-codegen/src/stmt/region_loop/mod.rs
  • crates/perry-codegen/src/stmt/region_loop/verify.rs
  • crates/perry-codegen/src/type_analysis.rs
  • crates/perry-codegen/src/type_analysis/numeric.rs
  • crates/perry-codegen/src/type_analysis/numeric/scalar_own_read_tests.rs
  • crates/perry-codegen/src/type_analysis/numeric/tests.rs
  • crates/perry-codegen/src/type_analysis/pod.rs
  • crates/perry-runtime/src/object/native_get.rs
  • crates/perry-runtime/src/object/native_get/tests.rs
  • crates/perry-runtime/src/object/shapes.rs
  • crates/perry-runtime/src/object/shapes_own_data.rs
  • test-files/test_gap_10769_own_read_scalar_proof.ts
 ___________________________________
< Mission: Impossible - Rogue Code. >
 -----------------------------------
  \
   \   \
        \ /\
        ( )
      .( o ).
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@proggeramlug
proggeramlug marked this pull request as ready for review October 5, 2026 21:57
@proggeramlug
proggeramlug merged commit 001997e into main Oct 5, 2026
50 of 54 checks passed
@proggeramlug
proggeramlug deleted the perf-own-read-proofs branch October 5, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant