[PERF] Cut per-VM allocations in the append VM - #21606
Conversation
Split out of nvp/simplify-some-vm-hot-paths. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
| }; | ||
| }; | ||
| this.debug = (): DebugStacks => ({ | ||
| scope: [...this.scope], |
There was a problem hiding this comment.
boooo array spread
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.
|
Order-swap check. Same two builds (
n/s = not significant in at least one of the two runs. Result: every row that is significant in both runs points the same way regardless of which build tracerbench treated as control, so this is not positional bias. The PR is slower on clearItems2, render10000Items1, clearManyItems2 and updateEvery10thItem2, and faster on render1000Items2 and the remove, swap and clearItems4 phases, in both orders. |
|
One correction to my earlier reading of run 2: I said updateEvery10thItem2 "did not reproduce" there because tracerbench did not mark it significant. Looking at the sample summaries, the PR median was 578ms against 286ms for main in that run too, the same doubling as every other run. It failed significance only because the PR samples are bimodal (min about 270ms, max about 660ms), which widens the confidence interval until it crosses zero. Across all five runs the PR build's samples for this phase have a minimum matching main (about 250 to 290ms) but a median of 580 to 680ms, while main's median stays at 290 to 330ms with only occasional slow samples. So both builds have a fast mode and a slow mode for this phase. On main the slow mode is rare; on this PR it is the common case. That is also why this PR shows visibly more variance than main in every run including the swapped one: the bimodal phase inflates the spread of the whole-run total. It behaves like a major GC that now usually lands inside the second update pass. |
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Revised branch (023b930): debug snapshots use
Reading: swapping |
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