diff options
| author | Dan Halbert <halbert@halwitz.org> | 2019-06-11 12:43:48 -0400 |
|---|---|---|
| committer | Dan Halbert <halbert@halwitz.org> | 2019-06-11 12:43:48 -0400 |
| commit | ea760c042bcdff61792a4b5f3de0b3ec212c44c4 (patch) | |
| tree | 925356ceacb410b9249a355fe4710179ce010fc4 | |
| parent | c85e111675ccfb0c03aa06bd3461f5a3c026ec87 (diff) | |
Turn on MICROPY_OPT_COMPUTED_GOTO for 5x CPU-bound speedup
| -rw-r--r-- | py/circuitpy_mpconfig.h | 1 | ||||
| -rw-r--r-- | py/vmentrytable.h | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index c794759f8..2026185ef 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -72,6 +72,7 @@ #define MICROPY_KBD_EXCEPTION (1) #define MICROPY_MEM_STATS (0) #define MICROPY_NONSTANDARD_TYPECODES (0) +#define MICROPY_OPT_COMPUTED_GOTO (1) #define MICROPY_PERSISTENT_CODE_LOAD (1) #define MICROPY_PY_ARRAY (1) diff --git a/py/vmentrytable.h b/py/vmentrytable.h index 615f4e2ce..a0e2d4065 100644 --- a/py/vmentrytable.h +++ b/py/vmentrytable.h @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#if __clang__ +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winitializer-overrides" #endif // __clang__ @@ -113,6 +113,6 @@ static const void *const entry_table[256] = { [MP_BC_BINARY_OP_MULTI ... MP_BC_BINARY_OP_MULTI + MP_BINARY_OP_NUM_BYTECODE - 1] = &&entry_MP_BC_BINARY_OP_MULTI, }; -#if __clang__ +#ifdef __clang__ #pragma clang diagnostic pop #endif // __clang__ |
