[issue45213] Frozen modules are looked up using a linear search.
Eric Snow
report at bugs.python.org
Wed Sep 22 11:43:36 EDT 2021
Eric Snow <ericsnowcurrently at gmail.com> added the comment:
On Wed, Sep 22, 2021 at 7:12 AM Dong-hee Na <report at bugs.python.org> wrote:
> I thought about the Trie implementation for this case.
On Wed, Sep 22, 2021 at 7:22 AM Marc-Andre Lemburg
<report at bugs.python.org> wrote:
> Perhaps a frozen dict could be used instead of the linear search.
>
> This could then also be made available as sys.frozen_modules for inspection by applications and tools such as debuggers or introspection tools trying to find source code (and potentially failing at this).
Both are worth exploring later. FWIW, I was also considering
_Py_hashtable_t (from Include/internal/pycore_hashtable.h).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45213>
_______________________________________
More information about the Python-bugs-list
mailing list