Skip to content

Commit 693b927

Browse files
committed
rp2: Enable optimisations (comp goto, map cache, fast attr).
Computed goto costs 1800 bytes for 5-10% performance. Map caching and attr fast path costs 130 bytes for up to 30%. Net effect of those three optimisations: bm_chaos.py +16.059% (+/-0.09%) bm_fannkuch.py +11.145% (+/-0.01%) bm_fft.py +14.604% (+/-0.01%) bm_float.py +26.849% (+/-0.08%) bm_hexiom.py +34.039% (+/-0.03%) bm_nqueens.py +18.333% (+/-0.06%) bm_pidigits.py +4.472% (+/-0.03%) misc_aes.py +28.765% (+/-0.09%) misc_mandel.py +27.116% (+/-0.05%) misc_pystone.py +40.299% (+/-0.20%) misc_raytrace.py +22.812% (+/-0.07%) Also enable other EXTRA-level optimisations (module const, return_if_expr, triple_tuple_assign, factorial, mpz bitwise). Signed-off-by: Jim Mussared <[email protected]>
1 parent c62351f commit 693b927

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

ports/rp2/mpconfigport.h

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,11 @@
5555
#define MICROPY_EMIT_INLINE_THUMB_FLOAT (0)
5656
#define MICROPY_EMIT_INLINE_THUMB_ARMV7M (0)
5757

58+
// Optimisations
59+
#define MICROPY_OPT_COMPUTED_GOTO (1)
60+
5861
// Features currently overriden for rp2, planned to be brought in line with
5962
// other ports
60-
#define MICROPY_COMP_MODULE_CONST (0)
61-
#define MICROPY_COMP_RETURN_IF_EXPR (0)
62-
#define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (0)
63-
#define MICROPY_OPT_COMPUTED_GOTO (0)
64-
#define MICROPY_OPT_LOAD_ATTR_FAST_PATH (0)
65-
#define MICROPY_OPT_MAP_LOOKUP_CACHE (0)
66-
#define MICROPY_OPT_MATH_FACTORIAL (0)
67-
#define MICROPY_OPT_MPZ_BITWISE (0)
6863
#define MICROPY_PY_BUILTINS_EXECFILE (0)
6964
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
7065
#define MICROPY_REPL_EMACS_KEYS (0)

0 commit comments

Comments
 (0)