diff options
| author | Damien George | 2014-04-14 21:20:30 +0100 |
|---|---|---|
| committer | Damien George | 2014-04-14 21:20:30 +0100 |
| commit | 3bb8bd899b2b1e5970b5ceb822bdf3df9b2e2d13 (patch) | |
| tree | 0396642ad4a39c2de561330b02b4ae1d6e9fc5b5 /py/mpconfig.h | |
| parent | 0ae9c7042ae0839cea575955f36af280943cb99f (diff) | |
Make USE_COMPUTED_GOTO a config option in mpconfig.h.
Disabled by default. Enabled in unix port.
Diffstat (limited to 'py/mpconfig.h')
| -rw-r--r-- | py/mpconfig.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h index f9c02a6f0..8f60c997b 100644 --- a/py/mpconfig.h +++ b/py/mpconfig.h @@ -154,6 +154,12 @@ typedef double mp_float_t; #define MICROPY_PATH_MAX (512) #endif +// 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 +#ifndef MICROPY_USE_COMPUTED_GOTO +#define MICROPY_USE_COMPUTED_GOTO (0) +#endif + // Additional builtin function definitions - see builtintables.c:builtin_object_table for format. #ifndef MICROPY_EXTRA_BUILTINS #define MICROPY_EXTRA_BUILTINS |
