[PERF] Cut per-VM allocations in the append VM - #21606
NullVoxPopuli wants to merge 2 commits into
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
023b930 to
6ae1674
Compare
Split out of nvp/simplify-some-vm-hot-paths. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
6ae1674 to
01d7c35
Compare
|
Tracerbench PDF for a run with With every sample starting from the same heap, this PR is a small net gain: Ember's script time is 2.1% lower in total, 4 to 7% lower on most renders, 5.7% lower on the second update, and 6.6% lower on the second select. The append slowdowns from my plain run are gone. Two costs remain: clearItems2 is 15% slower in script time (about 13 ms at 8x), and the app's first render is 14% slower (about 3 ms at 8x). The final
Tracerbench's own report still marks selectSecondRow1 19.9% slower. With main-thread GC removed, that phase does not change, so a major GC still lands there in the middle of the run. The How this was measured
|
The
Stacksclass uses plain arrays instead of sixStackImplwrappers, andexecute()runs the opcode loop directly instead of allocating a{ done, value }result per instruction. A VM is constructed for every independently re-rendering block, so this shows up on{{#each}}-heavy pages.🤖 Generated with Claude Code