Message145342
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 |
|
Date |
User |
Action |
Args |
2011-10-11 13:37:05 | pitrou | set | recipients:
+ pitrou, terry.reedy, ncoghlan, nadeem.vawda, tarek, ezio.melotti, eric.araujo |
2011-10-11 13:37:05 | pitrou | set | messageid: <1318340225.12.0.50024554995.issue13150@psf.upfronthosting.co.za> |
2011-10-11 13:37:04 | pitrou | link | issue13150 messages |
2011-10-11 13:37:04 | pitrou | create | |
|