Message201868
Original:
$ ./python -S -m timeit -s 'import sys' 'import keyword; keyword=None; del sys.modules["keyword"]'
10000 loops, best of 3: 149 usec per loop
Python patched with keyword_grammar.patch:
$ ./python -S -m timeit -s 'import sys' 'import keyword; keyword=None; del sys.modules["keyword"]'
10000 loops, best of 3: 20 usec per loop
The gain is 129 microseconds (import 7.4x faster). Python starts in between 8,850 and 13,800 microseconds on my PC:
$ ./python -S -m timeit -s 'import subprocess; args=[sys.executable, "-S", "-c", "pass"]' 'subprocess.call(args)'
100 loops, best of 3: 8.85 msec per loop
$ ./python -S -m timeit -s 'import subprocess; args=[sys.executable, "-c", "pass"]' 'subprocess.call(args)'
100 loops, best of 3: 13.8 msec per loop |
|
Date |
User |
Action |
Args |
2013-11-01 01:19:40 | vstinner | set | recipients:
+ vstinner, brett.cannon, georg.brandl, pitrou, christian.heimes |
2013-11-01 01:19:40 | vstinner | set | messageid: <1383268780.0.0.552874058256.issue19230@psf.upfronthosting.co.za> |
2013-11-01 01:19:39 | vstinner | link | issue19230 messages |
2013-11-01 01:19:37 | vstinner | create | |
|