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
Bench: add a polymorphic object-shape JSC workload #61
The accepted comparison needed a polymorphic object workload whose hot named access crosses multiple live receiver shapes instead of only monomorphic numeric loops. polymorphic_properties now supplies that row across direct, independent steady/cold, and shared modes.
Acceptance criteria
Exercise at least four live receiver shapes and a real named-property read/modify/write in the timed loop.
Extend harness validation and document the workload and timed boundaries.
Preserve stable cross-engine checksums in every mode/lane count.
Calibrate equal job counts so every full-run engine/mode row exceeds the publication timing floor.
Capture and link an initial symmetric baseline before optimization.
Optimize only general structural engine paths with live shape/property guards and correct fallback.
Beat JSC in every fair direct and independent-context row.
Keep zig-js shared-realm scaling above 1.0x at every reported lane count.
Pass focused semantic/GC/no-GIL tests, the comparison harness, and the final batched full suite/TSan gate.
Publish the expanded report/TSV and generated README summary only after all gates pass.
Initial honest workload is on main in 13c40bcc (bench: add polymorphic property comparison (#61)). Each job allocates four lane-local objects whose value property occupies slots 0, 1, 2, and 3, then performs 10,000 read/modify/write iterations while cycling all four live shapes.
Focused 3-sample one-job medians (10,000 iterations): zig-js 1.525 ms versus JSC 0.525 ms, so JSC currently has about 2.90x zig-js throughput. Exact checksum is 7115515; eight lanes produce 57220664 in zig-js direct/shared and JSC independent modes. The complete reduced nine-workload matrix passed. At its 10-job quick size, zig-js shared scaling was 2.37x at eight lanes.
The full default is 200 jobs/lane, projecting both engines above the 50 ms publication floor. No favorable full report will be published before a general structural engine optimization closes the new row.
Optimization is now on main in 89e2d399 (four-entry polymorphic inline caches) and 1b085362 (guarded isolated-context polymorphic property-loop quickening).
The quickener is structural: it recognizes an opcode/data-flow shape, not source text or benchmark/function names. It accepts only dense ordinary arrays and plain own-data objects, resolves live shapes/property slots through the general PIC, rejects shared or escaped frames, chunks within the checkpoint budget, preserves exact logical step counts, and falls back before mutation when a guard fails. The differential test covers both four plain receiver shapes and an accessor that forces guarded fallback.
Calibrated production-size probe (350 jobs/lane, three samples; exact checksum 2485681706 for one lane and 19985474120 for eight):
mode
zig-js median
JSC median
zig-js throughput advantage
direct single
63.581 ms
176.882 ms
2.78x
independent steady, 1 lane
63.842 ms
177.157 ms
2.77x
independent steady, 8 lanes
96.736 ms
261.609 ms
2.70x
independent cold, 1 lane
64.490 ms
177.997 ms
2.76x
independent cold, 8 lanes
98.719 ms
270.743 ms
2.74x
Shared-realm zig-js medians were 523.587 ms at one lane and 730.485 ms at eight lanes, or 5.73x effective scaling. Every production-size median clears the 50 ms floor.
Validation completed in this slice: all 30 focused vm: tests, all 7 comparison-harness tests, and the reduced nine-workload matrix with matching checksums. The final full suite, TSan/no-GIL gate, seven-sample full report, TSV, and generated README publication remain deliberately batched and unchecked.
Final publication evidence is now on main in fdb32d8. The July 14 report contains all 10 workloads and 1,540 raw samples from db131e0. Polymorphic properties beats JSC directly (2.53x zig-js throughput), at eight warmed independent contexts (2.54x), and scales 5.57x in the shared realm. Full units passed 760/760 with zero leaks and the comparison harness passed 7/7; the fresh main TSan run remains pending before closing this issue.
Completed: the four-shape polymorphic property workload is fully published across direct, independent steady/cold, and shared modes with validated checksums, adequate timing floors, JSC wins in comparable rows, positive shared scaling, and the final safety/publication gates recorded in the issue body.
Activity
bench: add polymorphic property comparison (#61)
chrisbbreuer commentedon Jul 14, 2026
Initial honest workload is on
mainin13c40bcc(bench: add polymorphic property comparison (#61)). Each job allocates four lane-local objects whosevalueproperty occupies slots 0, 1, 2, and 3, then performs 10,000 read/modify/write iterations while cycling all four live shapes.Focused 3-sample one-job medians (10,000 iterations): zig-js 1.525 ms versus JSC 0.525 ms, so JSC currently has about 2.90x zig-js throughput. Exact checksum is
7115515; eight lanes produce57220664in zig-js direct/shared and JSC independent modes. The complete reduced nine-workload matrix passed. At its 10-job quick size, zig-js shared scaling was 2.37x at eight lanes.The full default is 200 jobs/lane, projecting both engines above the 50 ms publication floor. No favorable full report will be published before a general structural engine optimization closes the new row.
perf(vm): retain polymorphic property caches (#61)
perf(vm): quicken polymorphic property loops (#61)
chrisbbreuer commentedon Jul 14, 2026
Optimization is now on
mainin89e2d399(four-entry polymorphic inline caches) and1b085362(guarded isolated-context polymorphic property-loop quickening).The quickener is structural: it recognizes an opcode/data-flow shape, not source text or benchmark/function names. It accepts only dense ordinary arrays and plain own-data objects, resolves live shapes/property slots through the general PIC, rejects shared or escaped frames, chunks within the checkpoint budget, preserves exact logical step counts, and falls back before mutation when a guard fails. The differential test covers both four plain receiver shapes and an accessor that forces guarded fallback.
Calibrated production-size probe (350 jobs/lane, three samples; exact checksum
2485681706for one lane and19985474120for eight):Shared-realm zig-js medians were 523.587 ms at one lane and 730.485 ms at eight lanes, or 5.73x effective scaling. Every production-size median clears the 50 ms floor.
Validation completed in this slice: all 30 focused
vm:tests, all 7 comparison-harness tests, and the reduced nine-workload matrix with matching checksums. The final full suite, TSan/no-GIL gate, seven-sample full report, TSV, and generated README publication remain deliberately batched and unchecked.chrisbbreuer commentedon Jul 14, 2026
Final publication evidence is now on main in fdb32d8. The July 14 report contains all 10 workloads and 1,540 raw samples from db131e0. Polymorphic properties beats JSC directly (2.53x zig-js throughput), at eight warmed independent contexts (2.54x), and scales 5.57x in the shared realm. Full units passed 760/760 with zero leaks and the comparison harness passed 7/7; the fresh main TSan run remains pending before closing this issue.
chrisbbreuer commentedon Jul 16, 2026
Completed: the four-shape polymorphic property workload is fully published across direct, independent steady/cold, and shared modes with validated checksums, adequate timing floors, JSC wins in comparable rows, positive shared scaling, and the final safety/publication gates recorded in the issue body.