This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients brett.cannon, christian.heimes, georg.brandl, pitrou, vstinner
Date 2013-11-01.01:19:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1383268780.0.0.552874058256.issue19230@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2013-11-01 01:19:40vstinnersetrecipients: + vstinner, brett.cannon, georg.brandl, pitrou, christian.heimes
2013-11-01 01:19:40vstinnersetmessageid: <1383268780.0.0.552874058256.issue19230@psf.upfronthosting.co.za>
2013-11-01 01:19:39vstinnerlinkissue19230 messages
2013-11-01 01:19:37vstinnercreate