[New-bugs-announce] [issue45213] Frozen modules are looked up using a linear search.

Eric Snow report at bugs.python.org
Wed Sep 15 13:42:12 EDT 2021


New submission from Eric Snow <ericsnowcurrently at 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 <report at bugs.python.org>
<https://bugs.python.org/issue45213>
_______________________________________


More information about the New-bugs-announce mailing list