Skip to content

Commit 60c6d55

Browse files
jimmodpgeorge
authored andcommitted
unix: Enable LOAD_ATTR fast path, and map lookup caching.
Enabled for all variants except minimal. Signed-off-by: Jim Mussared <[email protected]>
1 parent 68219a2 commit 60c6d55

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

ports/unix/mpconfigport.h

+6
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,12 @@
8282
#ifndef MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE
8383
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (1)
8484
#endif
85+
#ifndef MICROPY_OPT_LOAD_ATTR_FAST_PATH
86+
#define MICROPY_OPT_LOAD_ATTR_FAST_PATH (1)
87+
#endif
88+
#ifndef MICROPY_OPT_MAP_LOOKUP_CACHE
89+
#define MICROPY_OPT_MAP_LOOKUP_CACHE (1)
90+
#endif
8591
#define MICROPY_MODULE_WEAK_LINKS (1)
8692
#define MICROPY_CAN_OVERRIDE_BUILTINS (1)
8793
#define MICROPY_VFS_POSIX_FILE (1)

ports/unix/variants/minimal/mpconfigvariant.h

+2
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@
5656
#define MICROPY_STREAMS_NON_BLOCK (0)
5757
#define MICROPY_OPT_COMPUTED_GOTO (0)
5858
#define MICROPY_OPT_CACHE_MAP_LOOKUP_IN_BYTECODE (0)
59+
#define MICROPY_OPT_LOAD_ATTR_FAST_PATH (0)
60+
#define MICROPY_OPT_MAP_LOOKUP_CACHE (0)
5961
#define MICROPY_CAN_OVERRIDE_BUILTINS (0)
6062
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (0)
6163
#define MICROPY_CPYTHON_COMPAT (0)

0 commit comments

Comments
 (0)