Optimize zero-sized allocation#5420
Open
aykevl wants to merge 3 commits into
Open
Conversation
This refactor makes no other changes.
See the next commit, where this makes more sense.
85ca25e to
7a256dc
Compare
|
Size difference with the dev branch: Binary size differencenot the same command!
tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/adafruit4650
go: downloading tinygo.org/x/tinyfont v0.3.0
not the same command!
tinygo build -size short -o ./build/test.hex -target=pico ./examples/tmc5160/main.go
go: downloading golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d
not the same command!
tinygo build -size short -o ./build/test.hex -target=nano-rp2040 -stack-size 8kb ./examples/net/websocket/dial/
go: downloading golang.org/x/net v0.33.0
not the same command!
tinygo build -size short -o ./build/test.hex -target=nano-rp2040 -stack-size 8kb ./examples/net/mqttclient/natiu/
go: downloading github.com/soypat/natiu-mqtt v0.5.1
not the same command!
tinygo build -size short -o ./build/test.hex -target=wioterminal -stack-size 8kb ./examples/net/mqttclient/paho/
go: downloading github.com/eclipse/paho.mqtt.golang v1.2.0
flash ram
before after diff before after diff
37404 37376 -28 -0.07% 6604 6596 -8 -0.12% tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/pcf8523/
11720 11692 -28 -0.24% 5968 5960 -8 -0.13% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/scd4x/main.go
22680 22652 -28 -0.12% 7268 7260 -8 -0.11% tinygo build -size short -o ./build/test.hex -target=pico ./examples/w5500/main.go
62780 62756 -24 -0.04% 6296 6288 -8 -0.13% tinygo build -size short -o ./build/test.hex -target=feather-nrf52840 ./examples/is31fl3731/main.go
120160 120136 -24 -0.02% 12516 12508 -8 -0.06% tinygo build -size short -o ./build/test.hex -target=elecrow-rp2350 -stack-size 8kb ./examples/net/ntpclient/
62520 62504 -16 -0.03% 6332 6324 -8 -0.13% tinygo build -size short -o ./build/test.hex -target=feather-nrf52840 ./examples/max6675/main.go
103740 103724 -16 -0.02% 10408 10400 -8 -0.08% tinygo build -size short -o ./build/test.hex -target=metro-m4-airlift -stack-size 8kb ./examples/net/socket/
396524 396508 -16 -0.00% 19420 19420 0 0.00% tinygo build -size short -o ./build/test.hex -target=matrixportal-m4 -stack-size 8kb ./examples/net/webstatic/
345076 345060 -16 -0.00% 22468 22468 0 0.00% tinygo build -size short -o ./build/test.hex -target=wioterminal -stack-size 8kb ./examples/net/webserver/
346316 346300 -16 -0.00% 22440 22440 0 0.00% tinygo build -size short -o ./build/test.hex -target=wioterminal -stack-size 8kb ./examples/net/mqttclient/paho/
23892 23884 -8 -0.03% 5952 5952 0 0.00% tinygo build -size short -o ./build/test.hex -target=metro-rp2350 ./examples/bno08x/i2c/main.go
57420 57412 -8 -0.01% 3672 3672 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/sht3x/main.go
12268 12260 -8 -0.07% 5120 5120 0 0.00% tinygo build -size short -o ./build/test.hex -target=trinket-m0 ./examples/veml6070/main.go
353292 353284 -8 -0.00% 17376 17376 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal -stack-size 8kb ./examples/net/http-get/
167088 167080 -8 -0.00% 10432 10424 -8 -0.08% tinygo build -size short -o ./build/test.hex -target=arduino-mkrwifi1010 -stack-size 8kb ./examples/net/tlsclient/
5510 5504 -6 -0.11% 8918 8918 0 0.00% '-xesppie' is not a recognized feature for this target (ignoring feature)
7032 7028 -4 -0.06% 2256 2256 0 0.00% '-xesppie' is not a recognized feature for this target (ignoring feature)
18308 18308 0 0.00% 6784 6784 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/adafruit4650
61840 61840 0 0.00% 6528 6528 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/adt7410/main.go
8764 8764 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/adxl345/main.go
13636 13636 0 0.00% 7136 7136 0 0.00% tinygo build -size short -o ./build/test.hex -target=pybadge ./examples/amg88xx
8924 8924 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/apa102/main.go
11372 11372 0 0.00% 6928 6920 -8 -0.12% tinygo build -size short -o ./build/test.hex -target=nano-33-ble ./examples/apds9960/proximity/main.go
9828 9828 0 0.00% 5108 5108 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/apa102/itsybitsy-m0/main.go
7356 7356 0 0.00% 2296 2296 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/at24cx/main.go
8008 8008 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bh1750/main.go
7368 7368 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/blinkm/main.go
71612 71612 0 0.00% 3640 3640 0 0.00% tinygo build -size short -o ./build/test.hex -target=pinetime ./examples/bma42x/main.go
65724 65724 0 0.00% 6544 6544 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bmi160/main.go
27664 27664 0 0.00% 5120 5120 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bmp180/main.go
64396 64396 0 0.00% 6568 6568 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/bmp280/main.go
11816 11816 0 0.00% 5152 5152 0 0.00% tinygo build -size short -o ./build/test.hex -target=trinket-m0 ./examples/bmp388/main.go
7720 7720 0 0.00% 3336 3336 0 0.00% tinygo build -size short -o ./build/test.hex -target=bluepill ./examples/ds1307/sram/main.go
21604 21604 0 0.00% 3532 3532 0 0.00% tinygo build -size short -o ./build/test.hex -target=bluepill ./examples/ds1307/time/main.go
29080 29080 0 0.00% 5316 5316 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/ds3231/alarms/main.go
42956 42956 0 0.00% 5316 5316 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/ds3231/basic/main.go
4400 4400 0 0.00% 2256 2256 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/easystepper/main.go
70472 70472 0 0.00% 7328 7328 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/flash/console/spi
66832 66832 0 0.00% 9368 9368 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/flash/console/qspi
7068 7068 0 0.00% 2260 2260 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/gc9a01/main.go
67636 67636 0 0.00% 6704 6704 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m0 ./examples/gps/i2c/main.go
68336 68336 0 0.00% 6852 6852 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m0 ./examples/gps/uart/main.go
8420 8420 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/hcsr04/main.go
5528 5528 0 0.00% 2256 2256 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/hd44780/customchar/main.go
5568 5568 0 0.00% 2256 2256 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/hd44780/text/main.go
10376 10376 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/hd44780i2c/main.go
14248 14248 0 0.00% 6928 6920 -8 -0.12% tinygo build -size short -o ./build/test.hex -target=nano-33-ble ./examples/hts221/main.go
15980 15980 0 0.00% 2340 2340 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/hub75/main.go
10156 10156 0 0.00% 7264 7264 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/ili9341/basic
11144 11144 0 0.00% 5224 5224 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao ./examples/ili9341/basic
29436 29436 0 0.00% 38424 38424 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/ili9341/pyportal_boing
10188 10188 0 0.00% 7256 7256 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/ili9341/scroll
11224 11224 0 0.00% 5216 5216 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao ./examples/ili9341/scroll
263400 263400 0 0.00% 47108 47108 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/ili9341/slideshow
10472 10472 0 0.00% 5120 5120 0 0.00% tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/lis3dh/main.go
13632 13632 0 0.00% 6928 6920 -8 -0.12% tinygo build -size short -o ./build/test.hex -target=nano-33-ble ./examples/lps22hb/main.go
26188 26188 0 0.00% 2304 2304 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/lsm303agr/main.go
27860 27860 0 0.00% 7168 7168 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m4 ./examples/lsm303dlhc/main.go
12312 12312 0 0.00% 5128 5128 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/lsm6ds3/main.go
10020 10020 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/mag3110/main.go
8984 8984 0 0.00% 5120 5120 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/mcp23017/main.go
9416 9416 0 0.00% 5128 5128 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/mcp23017-multiple/main.go
9440 9440 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/mcp3008/main.go
71852 71852 0 0.00% 6584 6584 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/mcp2515/main.go
27572 27572 0 0.00% 3808 3808 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/microbitmatrix/main.go
27492 27492 0 0.00% 5852 5852 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit-v2 ./examples/microbitmatrix/main.go
7464 7464 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/mma8653/main.go
7368 7368 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/mpu6050/main.go
76572 76572 0 0.00% 7804 7804 0 0.00% tinygo build -size short -o ./build/test.hex -target=p1am-100 ./examples/p1am/main.go
13680 13680 0 0.00% 5964 5964 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/pca9685/main.go
6244 6244 0 0.00% 3268 3268 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/pcd8544/setbuffer/main.go
4628 4628 0 0.00% 2260 2260 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/pcd8544/setpixel/main.go
11792 11792 0 0.00% 5940 5940 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/seesaw/soil-sensor
13096 13096 0 0.00% 5948 5948 0 0.00% tinygo build -size short -o ./build/test.hex -target=qtpy-rp2040 ./examples/seesaw/rotary-encoder
3113 3113 0 0.00% 560 560 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino ./examples/servo
15264 15264 0 0.00% 6012 6012 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/sgp30
7988 7988 0 0.00% 7128 7128 0 0.00% tinygo build -size short -o ./build/test.hex -target=pybadge ./examples/shifter/main.go
57412 57412 0 0.00% 3680 3680 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/sht4x/main.go
57420 57420 0 0.00% 3672 3672 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/shtc3/main.go
12344 12344 0 0.00% 8712 8712 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao-ble ./examples/ssd1306/
13004 13004 0 0.00% 5892 5892 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao-rp2040 ./examples/ssd1306/
13092 13092 0 0.00% 5892 5892 0 0.00% tinygo build -size short -o ./build/test.hex -target=thumby ./examples/ssd1306/
5896 5896 0 0.00% 2260 2260 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/ssd1331/main.go
6808 6808 0 0.00% 2260 2260 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/st7735/main.go
6488 6488 0 0.00% 2260 2260 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/st7789/main.go
16784 16784 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/thermistor/main.go
9640 9640 0 0.00% 4880 4880 0 0.00% tinygo build -size short -o ./build/test.hex -target=circuitplay-bluefruit ./examples/tone
10136 10136 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/tm1637/main.go
12312 12312 0 0.00% 5952 5952 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/touch/capacitive
8816 8816 0 0.00% 7128 7128 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/touch/resistive/fourwire/main.go
12348 12348 0 0.00% 7324 7324 0 0.00% tinygo build -size short -o ./build/test.hex -target=pyportal ./examples/touch/resistive/pyportal_touchpaint/main.go
15772 15772 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/vl53l1x/main.go
14328 14328 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=itsybitsy-m0 ./examples/vl6180x/main.go
24636 24636 0 0.00% 14076 14076 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-nrf52840-sense ./examples/waveshare-epd/epd1in54/main.go
6356 6356 0 0.00% 2300 2300 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/waveshare-epd/epd2in13/main.go
5944 5944 0 0.00% 2292 2292 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/waveshare-epd/epd2in13x/main.go
6248 6248 0 0.00% 2300 2300 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/waveshare-epd/epd4in2/main.go
27644 27644 0 0.00% 19024 19024 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/waveshare-epd/epd2in66b/main.go
7096 7096 0 0.00% 5120 5120 0 0.00% tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/ws2812
1997 1997 0 0.00% 600 600 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino ./examples/ws2812
1488 1488 0 0.00% 182 182 0 0.00% tinygo build -size short -o ./build/test.hex -target=digispark ./examples/ws2812
32068 32068 0 0.00% 5120 5120 0 0.00% tinygo build -size short -o ./build/test.hex -target=trinket-m0 ./examples/bme280/main.go
16392 16392 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/microphone/main.go
11740 11740 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/buzzer/main.go
6796 6796 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/l293x/simple/main.go
8716 8716 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/l293x/speed/main.go
6772 6772 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/l9110x/simple/main.go
9120 9120 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/l9110x/speed/main.go
7280 7280 0 0.00% 3308 3308 0 0.00% tinygo build -size short -o ./build/test.hex -target=nucleo-f103rb ./examples/shiftregister/main.go
13280 13280 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=circuitplay-express ./examples/lis2mdl/main.go
11248 11248 0 0.00% 5104 5104 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/max72xx/main.go
77060 77060 0 0.00% 6680 6680 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m0 ./examples/dht/main.go
71424 71424 0 0.00% 6688 6688 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao ./examples/pcf8563/alarm/
7176 7176 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao ./examples/pcf8563/clkout/
70860 70860 0 0.00% 6688 6688 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao ./examples/pcf8563/time/
71256 71256 0 0.00% 6688 6688 0 0.00% tinygo build -size short -o ./build/test.hex -target=xiao ./examples/pcf8563/timer/
13388 13388 0 0.00% 5916 5916 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/qmi8658c/main.go
12524 12524 0 0.00% 5900 5900 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-rp2040 ./examples/pcf8591/
8732 8732 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m0 ./examples/ina260/main.go
12176 12176 0 0.00% 5120 5120 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m0 ./examples/ina219/main.go
9312 9312 0 0.00% 5232 5232 0 0.00% tinygo build -size short -o ./build/test.hex -target=nucleo-l432kc ./examples/aht20/main.go
73864 73864 0 0.00% 11108 11108 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m4 ./examples/sdcard/console/
62096 62096 0 0.00% 8576 8576 0 0.00% tinygo build -size short -o ./build/test.hex -target=feather-m4 ./examples/i2csoft/adt7410/
10160 10160 0 0.00% 7128 7128 0 0.00% tinygo build -size short -o ./build/test.elf -target=wioterminal ./examples/axp192/m5stack-core2-blinky/
10424 10424 0 0.00% 5888 5888 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/xpt2046/main.go
13140 13140 0 0.00% 4924 4916 -8 -0.16% tinygo build -size short -o ./build/test.hex -target=nucleo-wl55jc ./examples/sx126x/lora_rxtx/
42360 42360 0 0.00% 8964 8964 0 0.00% tinygo build -size short -o ./build/test.hex -target=pybadge ./examples/sx127x/lora_rxtx/
33144 33144 0 0.00% 7408 7408 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/ssd1289/main.go
12796 12796 0 0.00% 6880 6880 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/irremote/main.go
13452 13452 0 0.00% 5964 5964 0 0.00% tinygo build -size short -o ./build/test.hex -target=badger2040 ./examples/uc8151/main.go
13756 13756 0 0.00% 6408 6408 0 0.00% tinygo build -size short -o ./build/test.hex -target=badger2040 ./examples/waveshare-epd/epd2in9v2/main.go
7984 7984 0 0.00% 5088 5088 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=circuitplay-express ./examples/makeybutton/main.go
9448 9448 0 0.00% 5104 5104 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/ds18b20/main.go
17792 17792 0 0.00% 7568 7568 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/as560x/main.go
11544 11544 0 0.00% 5908 5908 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/mpu6886/main.go
7764 7764 0 0.00% 5080 5080 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/ttp229/main.go
62036 62036 0 0.00% 3768 3768 0 0.00% tinygo build -size short -o ./build/test.hex -target=microbit ./examples/ndir/main_ndir.go
65388 65388 0 0.00% 6600 6600 0 0.00% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 ./examples/ndir/main_ndir.go
11068 11068 0 0.00% 5900 5900 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/mpu9150/main.go
13056 13056 0 0.00% 5936 5936 0 0.00% tinygo build -size short -o ./build/test.hex -target=macropad-rp2040 ./examples/sh1106/macropad_spi
68440 68440 0 0.00% 7404 7396 -8 -0.11% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/mcp9808/main.go
43896 43896 0 0.00% 7736 7736 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=pico ./examples/tmc2209/main.go
13304 13304 0 0.00% 5896 5896 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/tmc5160/main.go
12004 12004 0 0.00% 4900 4900 0 0.00% tinygo build -size short -o ./build/test.uf2 -target=nicenano ./examples/sharpmem/main.go
14020 14020 0 0.00% 5956 5956 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/ens160/main.go
88024 88024 0 0.00% 7756 7748 -8 -0.10% tinygo build -size short -o ./build/test.hex -target=challenger-rp2040 ./examples/net/ntpclient/
120616 120616 0 0.00% 8428 8424 -4 -0.05% tinygo build -size short -o ./build/test.hex -target=arduino-nano33 -stack-size 8kb ./examples/net/tcpclient/
315056 315056 0 0.00% 16664 16664 0 0.00% tinygo build -size short -o ./build/test.hex -target=nano-rp2040 -stack-size 8kb ./examples/net/websocket/dial/
156544 156544 0 0.00% 9384 9384 0 0.00% tinygo build -size short -o ./build/test.hex -target=nano-rp2040 -stack-size 8kb ./examples/net/mqttclient/natiu/
117132 117132 0 0.00% 13704 13696 -8 -0.06% tinygo build -size short -o ./build/test.hex -target=wioterminal -stack-size 8kb ./examples/net/webclient/
174808 174808 0 0.00% 14516 14516 0 0.00% tinygo build -size short -o ./build/test.hex -target=elecrow-rp2040 -stack-size 8kb ./examples/net/tlsclient/
122808 122816 8 0.01% 8112 8112 0 0.00% tinygo build -size short -o ./build/test.hex -target=nucleo-wl55jc ./examples/lora/lorawan/atcmd/
68744 68752 8 0.01% 7436 7428 -8 -0.11% tinygo build -size short -o ./build/test.hex -target=pico ./examples/ndir/main_ndir.go
9928 9944 16 0.16% 6372 6364 -8 -0.13% tinygo build -size short -o ./build/test.hex -target=macropad-rp2040 ./examples/encoders/quadrature-interrupt
17592 17640 48 0.27% 5972 5972 0 0.00% tinygo build -size short -o ./build/test.hex -target=pico ./examples/si5351/main.go
6401776 6401594 -182 -0.00% 1049404 1049264 -140 -0.00%
|
soypat
approved these changes
May 25, 2026
7a256dc to
b86e2e8
Compare
Member
Author
|
Fixed a few issues. Unfortunately CI appears to be down right now :( Specifically:
|
Member
|
@aykevl I think this is actual error here, please take a look: |
Instead of referring to an unused global, use a constant value. This is safe even when using `-gc=none` (since no actual memory gets allocated) which wasn't the case before. It should also reduce binary size by a few bytes for most programs.
b86e2e8 to
8ae64a0
Compare
Member
Author
|
@deadprogram thanks, should be fixed now! |
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.
Instead of referring to an unused global, use a constant value. This is safe even when using
-gc=none(since no actual memory gets allocated) which wasn't the case before. It should also reduce binary size by a few bytes for most programs.The first two commits are pure refactors and should not affect any programs.
Inspired by #5417, which fixes some of these allocations in a different way.