diff options
author | Jim Mussared <jim.mussared@gmail.com> | 2022-08-17 16:21:03 +1000 |
---|---|---|
committer | Jim Mussared <jim.mussared@gmail.com> | 2023-06-08 17:54:04 +1000 |
commit | dfe232d0003b9f381643050c06c547fc3093e9e1 (patch) | |
tree | c9b554e8d5289c9e85247dc60337f8333c556f65 /py/objmodule.c | |
parent | 30628d1bb782006c88325a086ddfcd5c2e5ddbb4 (diff) | |
download | micropython-dfe232d0003b9f381643050c06c547fc3093e9e1.tar.gz micropython-dfe232d0003b9f381643050c06c547fc3093e9e1.zip |
py/builtinimport: Remove weak links.
In order to keep "import umodule" working, the existing mechanism is
replaced with a simple fallback to drop the "u".
This makes importing of built-ins no longer touch the filesystem, which
makes a typical built-in import take ~0.15ms rather than 3-5ms.
(Weak links were added in c14a81662c1df812c0c6b4299f97966302f16477)
This work was funded through GitHub Sponsors.
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'py/objmodule.c')
-rw-r--r-- | py/objmodule.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/py/objmodule.c b/py/objmodule.c index 7326fbe2d1..e63fb18a1e 100644 --- a/py/objmodule.c +++ b/py/objmodule.c @@ -169,7 +169,6 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = { // builtin modules declared with MP_REGISTER_MODULE() MICROPY_REGISTERED_MODULES }; - MP_DEFINE_CONST_MAP(mp_builtin_module_map, mp_builtin_module_table); // Attempts to find (and initialise) a builtin, otherwise returns |