stm32: Disable computed goto on constrained boards.

Saves ~1kiB.  Add comment to this effect to mpconfig.h.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
This commit is contained in:
Jim Mussared
2021-08-19 17:49:33 +10:00
committed by Damien George
parent 61d5a8b9ce
commit b51e7e9d01
5 changed files with 7 additions and 1 deletions

View File

@@ -483,7 +483,8 @@
/* Optimisations */
// Whether to use computed gotos in the VM, or a switch
// Computed gotos are roughly 10% faster, and increase VM code size by a little
// Computed gotos are roughly 10% faster, and increase VM code size by a little,
// e.g. ~1kiB on Cortex M4.
// Note: enabling this will use the gcc-specific extensions of ranged designated
// initialisers and addresses of labels, which are not part of the C99 standard.
#ifndef MICROPY_OPT_COMPUTED_GOTO