[Python-Dev] Store startup modules as C structures for 20%+ startup speed improvement?

Terry Reedy tjreedy at udel.edu
Wed Sep 19 18:08:37 EDT 2018

On 9/18/2018 2:38 PM, Steve Dower wrote:

> The primary benefit of the importlib hook approach is that it would not 
> require rebuilding CPython each time you make a change.

If one edits a .c or .h file, one must rebuild to test.  If one edits a 
.py module, one does not, and it would be a major nuisance to have to.

My first suggested patches on the tracker (to .py files) were developed 
in my installed version (after backing up a module).  I have 
occasionally told people on StackOverflow how to edit an idlelib file to 
get a future change 'now'.  Other people have occasional reported there 
own custom modifications.  If Python usually used derived stdlib code, 
but could optionally use the original .py files via a command-line 
switch, experimenting with changes to .py files would be easier.

Terry Jan Reedy

More information about the Python-Dev mailing list