aboutsummaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George2014-04-14 21:20:30 +0100
committerDamien George2014-04-14 21:20:30 +0100
commit3bb8bd899b2b1e5970b5ceb822bdf3df9b2e2d13 (patch)
tree0396642ad4a39c2de561330b02b4ae1d6e9fc5b5 /py/mpconfig.h
parent0ae9c7042ae0839cea575955f36af280943cb99f (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.h6
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