New submission from Eric Snow <ericsnowcurren...@gmail.com>:
When looking up a frozen modules, we loop over the array of frozen modules until we find a match (or don't). See find_frozen() in Python/import.c. The frozen importer sits right after the builtin importer and right before the file-based importer. This means the import system does that frozen module lookup every time import happens (where it isn't a builtin module), even if it's a source module. ---------- components: Interpreter Core messages: 401863 nosy: barry, brett.cannon, eric.snow priority: normal severity: normal stage: needs patch status: open title: Frozen modules are looked up using a linear search. type: performance versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45213> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com