Skip to content

Remove unused heap compaction from ProgramHeapImpl - #21603

Open
NullVoxPopuli wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli:nvp/cleanup/remove-heap-compaction
Open

Remove unused heap compaction from ProgramHeapImpl#21603
NullVoxPopuli wants to merge 1 commit into
emberjs:mainfrom
NullVoxPopuli:nvp/cleanup/remove-heap-compaction

Conversation

@NullVoxPopuli

@NullVoxPopuli NullVoxPopuli commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

free() and compact() were never called, and the handleState table only existed to support them.

The heap only grows for the lifetime of the app, so the doc comment now says that instead of describing compaction rules.

This is arguably not great

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

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@NullVoxPopuli

Copy link
Copy Markdown
Contributor Author

Benchmark: main (bdb2580) vs nvp/cleanup/remove-heap-compaction (a7e20b9)

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 9,794ms 10,178ms 67ms (+0.7%) -217ms .. 372ms
render 158ms 158ms 0ms (-0.2%) -9ms .. 9ms
render1000Items1 370ms 368ms -2ms (-0.6%) -16ms .. 15ms
clearItems1 40ms 39ms -1ms (-1.5%) -3ms .. 2ms
render1000Items2 287ms 293ms 2ms (+0.8%) -9ms .. 17ms
clearItems2 135ms 138ms 1ms (+0.6%) -2ms .. 4ms
render10000Items1 2,827ms 2,919ms 21ms (+0.7%) -111ms .. 177ms
clearManyItems1 374ms 380ms -1ms (-0.3%) -11ms .. 7ms
render10000Items2 2,722ms 2,841ms 0ms (+0.0%) -73ms .. 130ms
clearManyItems2 268ms 265ms -1ms (-0.3%) -15ms .. 10ms
render1000Items3 263ms 259ms 1ms (+0.4%) -19ms .. 12ms
append1000Items1 369ms 372ms 4ms (+1.2%) -15ms .. 53ms
append1000Items2 341ms 353ms 16ms (+4.7%) -5ms .. 66ms
updateEvery10thItem1 287ms 300ms 2ms (+0.8%) -9ms .. 18ms
updateEvery10thItem2 319ms 316ms 3ms (+0.9%) -35ms .. 23ms
selectFirstRow1 80ms 82ms 3ms (+4.2%) -3ms .. 13ms
selectSecondRow1 63ms 65ms -1ms (-1.1%) -7ms .. 8ms
removeFirstRow1 203ms 200ms -1ms (-0.4%) -16ms .. 14ms
removeSecondRow1 199ms 193ms -1ms (-0.5%) -15ms .. 12ms
swapRows1 131ms 138ms -1ms (-0.9%) -12ms .. 13ms
swapRows2 126ms 146ms 1ms (+1.2%) -3ms .. 20ms
clearItems4 104ms 106ms 1ms (+0.8%) -2ms .. 5ms
paint 7ms 9ms 1ms (+13.3%) -2ms .. 4ms

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