Issue 3078: tokenize.py improvements - Python tracker (original) (raw)

Issue3078

Created on 2008-06-11 13:10 by Indy, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
tokenize.py.patch Indy,2008-06-11 13:10 The patch in "diff -urN" format.
Messages (3)
msg67965 - (view) Author: Aristotelis Mikropoulos (Indy) Date: 2008-06-11 13:10
Various tokenize.py performance boosts and code clarifications.
msg68320 - (view) Author: Aristotelis Mikropoulos (Indy) Date: 2008-06-17 13:07
So, will this patch be applied?
msg68325 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2008-06-17 13:56
Sorry, I don't see any value in this kind of patch. The line "contline = += line" is broken. The "+=" transformations and else-clause eliminations trivially re-arrange code without any real savings. The "while 1" to "while True" transformation should not be done in Py2.x because the latter is much slower ("while True" requires loading a global variable and a test; in contrast, "while 1" is optimized to an unconditional jump.
History
Date User Action Args
2022-04-11 14:56:35 admin set github: 47328
2008-06-17 13:56:34 rhettinger set status: open -> closedresolution: rejectedmessages: + nosy: + rhettinger
2008-06-17 13:07:36 Indy set messages: +
2008-06-11 13:10:45 Indy create