diff options
| author | Jim Mussared <jim.mussared@gmail.com> | 2021-09-20 22:43:39 +1000 |
|---|---|---|
| committer | Jim Mussared <jim.mussared@gmail.com> | 2021-11-01 15:25:45 +1100 |
| commit | 693b927687c3ac18726a5eb7b64127fc347a3c41 (patch) | |
| tree | 7f06ffd4124f5b0ebfa15395b768d6046e5c7e01 | |
| parent | c62351fbd67e0f32e33e2066b7c07a79ac52481d (diff) | |
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 <jim.mussared@gmail.com>
| -rw-r--r-- | ports/rp2/mpconfigport.h | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index 788aeb163..2794fda2e 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -55,16 +55,11 @@ #define MICROPY_EMIT_INLINE_THUMB_FLOAT (0) #define MICROPY_EMIT_INLINE_THUMB_ARMV7M (0) +// Optimisations +#define MICROPY_OPT_COMPUTED_GOTO (1) + // Features currently overriden for rp2, planned to be brought in line with // other ports -#define MICROPY_COMP_MODULE_CONST (0) -#define MICROPY_COMP_RETURN_IF_EXPR (0) -#define MICROPY_COMP_TRIPLE_TUPLE_ASSIGN (0) -#define MICROPY_OPT_COMPUTED_GOTO (0) -#define MICROPY_OPT_LOAD_ATTR_FAST_PATH (0) -#define MICROPY_OPT_MAP_LOOKUP_CACHE (0) -#define MICROPY_OPT_MATH_FACTORIAL (0) -#define MICROPY_OPT_MPZ_BITWISE (0) #define MICROPY_PY_BUILTINS_EXECFILE (0) #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0) #define MICROPY_REPL_EMACS_KEYS (0) |
