Skip to content

Perf: beat JSC on recursive and general function-call throughput #48

Description

@chrisbbreuer

Parent: #44

Accepted baseline

The July 13, 2026 symmetric report measures:

  • direct single context: JSC leads recursive Fibonacci by 7.64x;
  • eight independent warmed contexts: JSC leads by 6.94x;
  • eight-lane independent scaling: zig-js reaches 5.33x versus JSC at 4.75x;
  • zig-js shared-realm scaling falls to 0.79x at eight lanes.

Activation recycling from eda34f5 remains a validated prerequisite: paired 20-job Fibonacci improved 1.186x and 50-job maximum RSS fell from 3.36 GiB to 6.9 MiB.

Evidence: harness c9f68e3; 616-sample report/README 2ebda1a; activation work #51.

Cross-cutting progress

Operand-stack fast path 22405c4 improved the Fibonacci single-context median from 481.224 ms to 461.224 ms (1.043x) across seven alternating old/new process pairs with unchanged checksums. All focused VM recursion/generator/try tests and the 88-group quick comparison matrix passed.

Investigation tracks

  • call dispatch and callable/type checks
  • execution frame and environment creation
  • argument binding and return propagation
  • bytecode coverage versus tree-walker fallback
  • GC roots and allocator traffic per call
  • no-GIL frame/environment contention

Acceptance criteria

  • Capture a symbolized profile and allocation counts for recursive calls.
  • Prove whether the benchmark uses bytecode or tree-walker execution and eliminate avoidable fallback.
  • Add focused call-path benchmarks for direct calls, recursion, arguments, closures, and methods.
  • Optimize common direct-call frames without weakening arguments, closures, recursion, stack limits, or exception unwinding.
  • Pass focused semantic, deep-recursion, GC, no-GIL, and TSan checks.
  • Beat JSC in every fair direct and independent-context Fibonacci row.
  • Restore shared-realm scaling above 1.0x at every reported lane count.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions