From ea760c042bcdff61792a4b5f3de0b3ec212c44c4 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 11 Jun 2019 12:43:48 -0400 Subject: Turn on MICROPY_OPT_COMPUTED_GOTO for 5x CPU-bound speedup --- py/circuitpy_mpconfig.h | 1 + py/vmentrytable.h | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'py') 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__ -- cgit v1.2.3