[Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?
carl.shapiro at gmail.com
Tue Sep 18 16:44:10 EDT 2018
On Tue, Sep 18, 2018 at 11:38 AM, Steve Dower <steve.dower at python.org>
> The primary benefit of the importlib hook approach is that it would not
> require rebuilding CPython each time you make a change. Since we need to
> consider a wide range of users across a wide range of platforms, having the
> ability to load a single native module that contains many "pre-loaded"
> modules allows many more people to access the benefits.
> It would not prevent some specific modules from being compiled into the
> main binary, but for those who do not build their own Python it would also
> allow specific applications to use the feature as well.
How might people feel about using the linker to bundle a list of pre-loaded
modules into a single-file executable? That would avoid the inconvenience
of rebuilding all of CPython by shipping a static libpython and having the
tool generate a .o or .S file with the un-marshaled data. (Linkers and
assemblers are small enough to be bundled on systems that do not have them.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev