New submission from Serhiy Storchaka: There are regressions in import time in 3.5 and 3.6.
$ for i in `seq 5`; do ./python -I -m timeit -n1 -r1 "import enum"; done Python 3.4: 1 loops, best of 1: 3.45 msec per loop 1 loops, best of 1: 3.43 msec per loop 1 loops, best of 1: 3.55 msec per loop 1 loops, best of 1: 3.54 msec per loop 1 loops, best of 1: 3.42 msec per loop Python 3.5: 1 loops, best of 1: 4.38 msec per loop 1 loops, best of 1: 4.31 msec per loop 1 loops, best of 1: 4.32 msec per loop 1 loops, best of 1: 4.32 msec per loop 1 loops, best of 1: 4.4 msec per loop Python 3.6: 1 loops, best of 1: 20.2 msec per loop 1 loops, best of 1: 20.2 msec per loop 1 loops, best of 1: 22 msec per loop 1 loops, best of 1: 20.3 msec per loop 1 loops, best of 1: 20.4 msec per loop $ for i in `seq 5`; do ./python -I -m timeit -n1 -r1 -s "import sys; sys.modules.clear()" -- "import enum"; done Python 3.4: 1 loops, best of 1: 29.5 msec per loop 1 loops, best of 1: 29.3 msec per loop 1 loops, best of 1: 30 msec per loop 1 loops, best of 1: 28.9 msec per loop 1 loops, best of 1: 29.2 msec per loop Python 3.5: 1 loops, best of 1: 43.8 msec per loop 1 loops, best of 1: 44 msec per loop 1 loops, best of 1: 43.5 msec per loop 1 loops, best of 1: 43.1 msec per loop 1 loops, best of 1: 43.8 msec per loop Python 3.6: 1 loops, best of 1: 59.8 msec per loop 1 loops, best of 1: 59.1 msec per loop 1 loops, best of 1: 58.8 msec per loop 1 loops, best of 1: 58.6 msec per loop 1 loops, best of 1: 61.9 msec per loop And even in importing already imported and cached module there is small regression. $ for i in `seq 5`; do ./python -I -m timeit "import enum"; done Python 3.4: 100000 loops, best of 3: 3.04 usec per loop 100000 loops, best of 3: 3.07 usec per loop 100000 loops, best of 3: 3.08 usec per loop 100000 loops, best of 3: 3.11 usec per loop 100000 loops, best of 3: 3.04 usec per loop Python 3.5: 100000 loops, best of 3: 3.27 usec per loop 100000 loops, best of 3: 3.22 usec per loop 100000 loops, best of 3: 3.18 usec per loop 100000 loops, best of 3: 3.28 usec per loop 100000 loops, best of 3: 3.17 usec per loop Python 3.6: 100000 loops, best of 3: 3.29 usec per loop 100000 loops, best of 3: 3.26 usec per loop 100000 loops, best of 3: 3.34 usec per loop 100000 loops, best of 3: 3.35 usec per loop 100000 loops, best of 3: 3.35 usec per loop ---------- messages: 250941 nosy: brett.cannon, eric.snow, ncoghlan, serhiy.storchaka priority: normal severity: normal status: open title: Import time regression type: performance versions: Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25159> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com