Antoine Pitrou <pit...@free.fr> added the comment: Actually, a big part of that is compiling some regexes in the tokenize module. Just relying on the re module's internal caching shaves off 20% of total startup time.
Before: $ time ./python -S -c 'import tokenize' real 0m0.034s user 0m0.030s sys 0m0.003s $ time ./python -c '' real 0m0.055s user 0m0.050s sys 0m0.005s After: $ time ./python -S -c 'import tokenize' real 0m0.021s user 0m0.019s sys 0m0.001s $ time ./python -c '' real 0m0.044s user 0m0.038s sys 0m0.006s ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13150> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com