Skip to content

Replace UpdatingVMFrame objects with parallel arrays - #21607

Draft
NullVoxPopuli wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli:nvp/perf/updating-vm-frames
Draft

NullVoxPopuli wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli:nvp/perf/updating-vm-frames

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

UpdatingVM pushes a frame for every block during revalidation, so the per-frame UpdatingVMFrame allocation is replaced with three parallel arrays for ops, handlers, and program counters. Behavior is unchanged.

Split out of nvp/simplify-some-vm-hot-paths.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@NullVoxPopuli NullVoxPopuli changed the title [PERF] Replace UpdatingVMFrame objects with parallel arrays Replace UpdatingVMFrame objects with parallel arrays Sep 9, 2026
@NullVoxPopuli

Copy link
Copy Markdown
Contributor Author

Benchmark: main (bdb2580) vs nvp/perf/updating-vm-frames (8f236a5)

Ran via pnpm bench (the krausest js-framework-benchmark scenario in smoke-tests/benchmark-app, tracerbench, 20 samples each, 8x CPU throttle). Negative delta means the PR is faster. Only rows tracerbench marks significant (p < 0.05) are meaningful.

Phase main median PR median Δ (estimator) 95% CI Significant
Total duration 10,312ms 10,299ms -24ms (-0.2%) -298ms .. 206ms
render 157ms 158ms 1ms (+0.6%) -7ms .. 6ms
render1000Items1 370ms 368ms -1ms (-0.4%) -9ms .. 11ms
clearItems1 40ms 40ms -1ms (-2.0%) -2ms .. 1ms
render1000Items2 312ms 314ms -2ms (-0.6%) -18ms .. 7ms
clearItems2 138ms 138ms 0ms (+0.1%) -2ms .. 3ms
render10000Items1 2,918ms 2,918ms 2ms (+0.1%) -94ms .. 88ms
clearManyItems1 383ms 384ms -1ms (-0.1%) -7ms .. 5ms
render10000Items2 2,915ms 2,909ms -12ms (-0.4%) -90ms .. 40ms
clearManyItems2 274ms 278ms 4ms (+1.4%) -3ms .. 10ms
render1000Items3 286ms 287ms 1ms (+0.2%) -18ms .. 14ms
append1000Items1 405ms 383ms -7ms (-1.7%) -43ms .. 18ms
append1000Items2 365ms 358ms 0ms (+0.0%) -34ms .. 33ms
updateEvery10thItem1 320ms 315ms -5ms (-1.4%) -17ms .. 12ms
updateEvery10thItem2 357ms 357ms -1ms (-0.2%) -32ms .. 28ms
selectFirstRow1 87ms 83ms -2ms (-2.2%) -11ms .. 7ms
selectSecondRow1 69ms 66ms -2ms (-2.5%) -8ms .. 3ms
removeFirstRow1 221ms 210ms -7ms (-3.4%) -22ms .. 4ms
removeSecondRow1 213ms 203ms -9ms (-4.4%) -26ms .. 1ms
swapRows1 150ms 147ms -4ms (-2.7%) -19ms .. 7ms
swapRows2 149ms 137ms -9ms (-5.8%) -24ms .. 4ms
clearItems4 109ms 109ms -1ms (-1.2%) -4ms .. 1ms
paint 13ms 9ms -2ms (-16.0%) -6ms .. 0ms

@NullVoxPopuli
NullVoxPopuli marked this pull request as draft September 21, 2026 18:34

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant