Skip to content

Commit 2a736ee

Browse files
committed
Record promoted optimizer costs and validation
1 parent b4a0d1e commit 2a736ee

2 files changed

Lines changed: 20 additions & 1 deletion

File tree

‎TODO.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ Implement in this order:
10101010
functions, runtime helpers, imports, types, static data, and scratch regions
10111011
can disappear. Integrate this with existing demand-driven emission instead
10121012
of maintaining a second dependency model.
1013-
5. [ ] Verify equivalent observable behavior with focused runtime tests and the
1013+
5. [x] Verify equivalent observable behavior with focused runtime tests and the
10141014
maintained corpus, confirm Debug emission is unaffected, and record measured
10151015
byte savings and compiler resource costs. Enable the proven passes only for
10161016
Release. Add further passes only when size measurements justify them.

‎docs/WASM_SIZE_OPTIMIZATION.md‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,25 @@ fits into the existing instruction scan. A second cleanup sweep saves another
5656
enabled; it exposes useful simplifications without introducing another analysis.
5757
Pass savings interact and must not be added together as independent totals.
5858

59+
## Compiler cost
60+
61+
Optimized-host seven-sample medians for the promoted pipeline:
62+
63+
| Real script | Passes disabled | Promoted Release backend | Added backend time |
64+
| --- | ---: | ---: | ---: |
65+
| Minish Cap | 2.978 ms | 6.448 ms | 3.470 ms |
66+
| Lunistice | 16.505 ms | 19.161 ms | 2.656 ms |
67+
| Neon White | 0.505 ms | 1.005 ms | 0.500 ms |
68+
| A Hat in Time | 4.556 ms | 7.469 ms | 2.913 ms |
69+
70+
These measurements include lowering and emission but exclude parsing/type
71+
checking. Previous full-experiment totals were 7.591 / 20.856 ms on the primary
72+
scripts. The selected pipeline is faster in these measurements while retaining
73+
almost all size savings; cross-run differences are not isolated per-pass costs.
74+
All nine fixtures and individual samples are in `target/size-check/timing.json`.
75+
The optimized-host corpus check also validates identical sizes to the native
76+
development build. Debug does not pay these optimizer costs.
77+
5978
## Validation and reproduction
6079

6180
The promoted pipeline has focused instruction/control/function-sharing tests

0 commit comments

Comments
 (0)