Skip to content

Objects: amortize uncontended named-property synchronization #532

Description

@chrisbbreuer

Summary

Split from #531 after first-class Shape attribution proved that partitioned transition publication has zero per-Shape writer yields. The end-to-end shared-realm row remains limited by repeated ordinary-property synchronization around fresh, lane-local receivers.

Related: #478, #480, #471, #493. Parent benchmark/Shape work: #531.

Measured diagnosis

For 1,000 unique add/read/delete-to-base operations per lane, the 8-lane invocation records 8,016 Shape transition requests, 8,008 misses, and 0 transition writer yields. After private-activation Environment read elision and combined named-descriptor probes, the same 8,000 scored edges still record approximately:

  • 72,531 Environment binding-lock acquisitions;
  • 96,403 Object property-lock acquisitions;
  • 33,048 Object backing-lock acquisitions;
  • 24,073 Object element-lock acquisitions.

The combined descriptor snapshot lowers property-lock acquisitions from about 22.1 to 12.1 per edge, but quick wall samples remain noisy and aggregate 1/2/4/8 throughput is not monotonic. Lower counters alone are not acceptance evidence.

Requirements

  • Preserve exact OrdinaryGet/OrdinarySet/Delete semantics for accessors, attributes, prototype setters, Proxies, module namespaces, integer-indexed exotics, lazy function prototypes, host hooks, and JIT invalidation ordering.
  • Preserve engine-state race freedom under the no-GIL default and concurrent marking; ordinary JavaScript program races remain permitted as documented.
  • Do not use predictable hashing, disable locks globally, add benchmark-only fast paths, weaken validation, or hide work outside the claimed boundary.
  • Do not modify the user-owned stacks/queues/jobs work.

Acceptance

  • Committed base/variant/contended benchmark rows retain frozen checksums and equal timed work.
  • Partitioned total throughput is non-decreasing across 1/2/4/8 lanes on stable repeated samples; same-parent contention remains bounded and visible.
  • Exact attribution explains remaining Environment/property/backing/element acquisitions, contentions, worker CPU, allocation, GC, and RSS.
  • Shared/captured/root Environments and genuinely shared Objects keep synchronization; any private fast path has a written publication/revocation proof.
  • OOM rollback, bounded heap, moving/concurrent GC, same-name convergence, no-GIL TSan, threadfuzz profiles, and full units pass.
  • Object + Array-prototype + Proxy test262 show no regressions against the exact parent.
  • Exact-parent raw evidence and report are checked in before performance claims are published.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions