[issue41006] Reduce number of modules imported by runpy
STINNER Victor
report at bugs.python.org
Wed Jun 17 17:36:12 EDT 2020
STINNER Victor <vstinner at python.org> added the comment:
I close the issue. Making more imports lazy doesn't bring much benefit.
--
With the 3 changes, runpy now imports 55 modules, instead of 70.
The startup time is 1.3x faster, 18 ms instead of 24 ms:
Mean +- std dev: [before] 23.7 ms +- 0.4 ms -> [after] 17.8 ms +- 0.6 ms: 1.33x faster (-25%)
--
Avoiding itertools and types doesn't bring much benefit:
Mean +- std dev: [after] 17.8 ms +- 0.6 ms -> [WIP] 17.2 ms +- 0.4 ms: 1.03x faster (-3%)
----------
resolution: -> fixed
stage: patch review -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41006>
_______________________________________
More information about the Python-bugs-list
mailing list