Repository navigation
builder: add size tests for startup work removed by interp - #5983
Conversation
|
I sort of didn't include any of this stuff in the size tests on purpose, because then the results depend on the Go version used to compile the code, hence why my test was import-free. Is this actually stable? |
good question, let me check |
cec4d7c to
a6a870e
Compare
|
@jakebailey Good catch. size-sha256 changed with every Go version, even between 1.27.1 and 1.27.3, so I removed it. |
a6a870e to
5c40534
Compare
|
@deadprogram @jakebailey PTAL. I've removed the sha256 test, it was unstable across all Go versions, the other size tests were tested across several Go versions and are stable so they shouldn't introduce flakes. I'd like to land this soon to lock in the interp improvements that have landed in 0.44-dev |
jakebailey
left a comment
There was a problem hiding this comment.
If it's stable, seems fine
🫡 i'll watch them like a hawk. Any funny business and they're out. |
Recent changes that let interp move startup work to compile time did not show up in TestBinarySize, so their savings went unmeasured and a regression would go unnoticed. These samples cover the RP2 targets, ESP32-C3, slice growth and os. Their sizes match on Go 1.25 to 1.27. Run against the commits before and after each change, these rows show (code/rodata bytes, opt=z): - tinygo-org#5837 RP2 PLL: pico -1308/-548, pico2 -1128/-552 (opt=2 code -5 to -6 KB). Visible only with tinygo-org#5975. - tinygo-org#5963 llvm.ctlz: pico -818/-142, pico2 -754/-142, size-slice -163/-5. - tinygo-org#5973 os temp file seed: pico2 size-os -16 (opt=2 -32).
5c40534 to
966401a
Compare
Recent changes that let interp move startup work to compile time did
not show up in TestBinarySize, so their savings went unmeasured and a
regression would go unnoticed. These samples cover the RP2 targets,
ESP32-C3, slice growth and os. Their sizes match on Go 1.25 to 1.27.
Run against the commits before and after each change, these rows show
(code/rodata bytes, opt=z):
-6 KB). Visible only with builder: match size tests to the CLI interpreter limit #5975.