Repository navigation
fix: compile wasm eagerly in benchmarks - #154
Merged
Merged
Conversation
Merging this PR will regress 1 benchmark
Warning Please fix the performance issues or acknowledge them on CodSpeed. Performance Changes
Tip Investigate this regression by commenting Comparing Footnotes
|
Member
Author
|
These numbers aren't a fair comparison because main doesn't have an up-to-date benchmark AFAICT |
commit: |
cowboyd
approved these changes
Dec 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Compiles WebAssembly eagerly in the bench project so that V8's wasm compilation stops showing up as memory regressions.
V8 compiles
@bomb.sh/tty's wasm module lazily. Each function is compiled the first time it's called, and hot functions are recompiled later. Those are native allocations with no JS stack. EverycreateUIreuses the same compiled module, so the cost lands on whichever bench happens to trigger it. That's the source of the "still open" peaks from #151:initial render::grass (100)andsingle value update::grass (500). Before #143, the same cost landed onevergreen (100)andbamboo (100).--no-liftoff --no-wasm-lazy-compilation. All wasm is compiled with TurboFan when the module loads, before any bench runs.CodSpeed
Each experiment compares against main (
3481fbe):--no-wasm-lazy-compilation --no-wasm-tier-up--no-liftoff --no-wasm-lazy-compilation(this PR)Comparison
The same comparison also shows 2–3 KB swings in peak memory on 5 benches with identical ui code. That's normal variation between runs, not a regression.
Type of change
Checklist
pnpm test)pnpm format)No changeset: benchmark tooling only.
AI-generated code disclosure