Explicitly state that PEP 488 doesn't influence import performance

This commit is contained in:
Brett Cannon 2015-03-06 13:16:54 -05:00
parent e213a64794
commit ae1f7aa5f1
1 changed files with 9 additions and 0 deletions

View File

@ -108,6 +108,15 @@ passed to the interpreter then instead of
``importlib.cpython-35.pyo`` the file name would be
``importlib.cpython-35.opt-2.pyc``.
It should be noted that this change in no way affects the performance
of import. Since the import system looks for a single bytecode file
based on the optimization level of the interpreter already and
generates a new bytecode file if it doesn't exist, the introduction
of potentially more bytecode files in the ``__pycache__`` directory
has no effect. The interpreter will continue to look for only a
single bytecode file based on the optimization level and thus no
increase in stat calls will occur.
Implementation
==============