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>
pull/7826/head
Jim Mussared 2021-09-20 22:43:39 +10:00
rodzic c62351fbd6
commit 693b927687
1 zmienionych plików z 3 dodań i 8 usunięć

Wyświetl plik

@ -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)