micropython/ports
Damien George 5987130afd webassembly/Makefile: Change compiler optimisation from O3 to Os.
Emscripten strongly advises the use of optimisation when compiling with
ASYNCIFY enabled.  Testing the difference betwen O3 and Os for various
configurations gives:

    flags                      firmware.wasm   micropython.js  perf
    -O3 -s ASYNCIFY            1342003          212845         0 (baseline)
    -O3 -s ASYNCIFY -s WASM=0        -         7064750         -30%
    -O3                         367131          196569         +140%
    -O3 -s WASM=0                    -         2818260         +30%
    -Os -s ASYNCIFY            1135450          213064         +40%
    -Os -s ASYNCIFY -s WASM=0        -         6239768         -30%
    -Os                         295028          196569         +180%
    -Os -s WASM=0                    -         2271358         +30%

The first row is prior to this commit.  The second and third columns show
firmware size (add them to get the total size).  The fourth column shows
the approximate change in performance compared to the baseline.  The
performance was measured using run-perfbench.py and the error was large, up
to 20%, although general trends in the change in performance could still be
seen.

In summary, using using Os instead of O3 makes it a little bit faster in
all cases, and smaller output (wasm/js) in all cases.

Signed-off-by: Damien George <damien@micropython.org>
2022-11-07 17:18:42 +11:00
..
bare-arm
cc3200 extmod: Make extmod.mk self-contained. 2022-10-11 23:31:49 +11:00
esp32 esp32/machine_pwm: Verify PWM is active when config methods are called. 2022-10-31 11:54:46 +11:00
esp8266 extmod: Make extmod.mk self-contained. 2022-10-11 23:31:49 +11:00
mimxrt mimxrt/machine_timer: Use extmod version of machine.Timer. 2022-10-27 14:43:03 +11:00
minimal extmod: Make extmod.mk self-contained. 2022-10-11 23:31:49 +11:00
nrf nrf: Rename MICROPY_PY_MACHINE_TIMER to MICROPY_PY_MACHINE_TIMER_NRF. 2022-10-27 14:30:58 +11:00
pic16bit all: Use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS. 2022-10-11 23:17:41 +11:00
powerpc all: Use += rather than = everywhere for CFLAGS/LDFLAGS/LIBS. 2022-10-11 23:17:41 +11:00
qemu-arm py/objstr: Add hex/fromhex to bytes/memoryview/bytearray. 2022-08-12 12:44:30 +10:00
renesas-ra renesas-ra/machine_timer: Use extmod version of machine.Timer. 2022-10-27 14:44:12 +11:00
rp2 extmod/mbedtls: Enable elliptic curve DH and DSA cryptography. 2022-10-22 19:08:21 +11:00
samd samd/machine_timer: Use extmod version of machine.Timer. 2022-10-27 14:45:24 +11:00
stm32 extmod/machine_timer: Move stm32's implementation of machine.Timer here. 2022-10-27 14:32:43 +11:00
teensy extmod: Make extmod.mk self-contained. 2022-10-11 23:31:49 +11:00
unix extmod/mbedtls: Enable MBEDTLS_TLS_DEFAULT_ALLOW_SHA1_IN_KEY_EXCHANGE. 2022-10-22 19:06:21 +11:00
webassembly webassembly/Makefile: Change compiler optimisation from O3 to Os. 2022-11-07 17:18:42 +11:00
windows extmod: Make extmod.mk self-contained. 2022-10-11 23:31:49 +11:00
zephyr zephyr: Rename machine I2C and SPI types consistently across ports. 2022-10-22 12:58:21 +11:00