Skip to content

Perf: publish warmed fixed-shape literals in one inline-slot initialization #73

Description

@chrisbbreuer

Parent: #62

The post-c4f4682d object_churn profile shows that the general 61-op loop quickening removed most dispatch cost, exposing repeated generic literal-transition work as the next avoidable bottleneck.

Fresh evidence on main:

  • 20 standard-size warmed samples, exact checksum 1030552128
  • 5-second symbolized sample top-of-stack counts: Object.appendSlot 397, Object.applyLiteralTransition 381, canonicalIndex 176, versus vm.runChunk 635
  • young-GC work remains separate and must not be bypassed

Scope:

  • add a reusable Object helper that can publish a proven fixed shape and up to the inline-slot capacity in one operation
  • require a fresh unpublished ordinary object, an exact contiguous root-to-final shape chain, non-index property names, matching slot/count metadata, and no accessor/attribute/key-order state
  • preserve insertion barriers for object-valued slots and retain real GC allocation/finalization
  • use it from the structurally recognized object-allocation loop only after its warmed literal transitions validate; otherwise fall back to ordinary bytecode
  • keep synchronized/no-GIL execution on the existing generic path

Acceptance:

  • focused tests compare optimized and ordinary execution results and exact step accounting
  • tests cover object-valued slot barrier semantics or the generic helper directly, plus rejection/fallback guards
  • full unit and benchmark-harness suites pass once after the focused checks
  • pinned clean A/B shows a repeatable object_churn improvement with identical checksums
  • compare a fresh candidate against JSC and record the remaining gap on Bench: add bounded object-allocation churn vs JSC #62
  • commit references this issue and is pushed as Chris without coauthors

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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