You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Perf: hoist immutable literal-shape validation out of allocation loops #74
The post-#73 profile confirms the generic transition work is gone, but the new safe initializer validates the same immutable root-to-final shape chain and compares its property names on every object allocation. The symbolized sample attributes 237 top-of-stack samples (about 5% of the 5-second capture) to the equality routine used by those repeated checks.
Scope:
introduce a reusable prepared inline-literal-shape descriptor
validate the complete root-to-final chain, slot/count sequence, distinct non-index names, and inline capacity once when preparing the descriptor
keep per-object guards for a fresh empty inline-slot receiver and matching value count
publish values with the existing insertion barriers and final shape
prepare the descriptor only after the quick loop resolves its warmed immutable transitions
retain ordinary bytecode fallback and leave synchronized/no-GIL execution unchanged
Acceptance:
direct tests prove valid preparation/publication and rejection of indexed, duplicate, wrong-root, wrong-count, occupied, accessor/attribute/key-order, and non-extensible cases
VM optimized/ordinary exact result and step coverage stays green
post-change profile removes repeated name equality from the allocation hot path
pinned 1821c8a A/B is repeatably faster with exact checksums
run the full unit plus benchmark-harness suite once only after a measured win
commit references this issue and is pushed as Chris without coauthors
Activity
perf(objects): prepare fixed literal shapes once (#74)
chrisbbreuer commentedon Jul 14, 2026
Implemented and pushed to main in cfed7bc.
What landed:
Coverage explicitly rejects wrong count, wrong root, duplicate names, indexed names, occupied receivers, accessors, attributes, key-order state, and sealed receivers. Optimized/ordinary VM result bits and exact steps remain covered.
Post-change profile:
Pinned 1821c8a vs cfed7bc evidence:
Validation: