I did a few optimizations and re-ran the experiments in the same machine. The geometric mean is now:
-
1.00x slower— CPython vs. Lazy Imports disabled. -
1.01x slower— CPython vs. Lazy Imports enabled. -
1.01x slower— Lazy Imports disabled vs. Lazy Imports enabled.
You can check the detailed results in the same link: cpython/README.md at lazy_imports-pyperformance · Kronuz/cpython · GitHub
cc: @guido, @markshannon