Title: improvements
Type: performance Stage:
Components: Library (Lib) Versions: Python 2.5
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: Indy, facundobatista
Priority: normal Keywords: patch

Created on 2008-06-21 09:51 by Indy, last changed 2008-07-11 02:43 by facundobatista. This issue is now closed.

File name Uploaded Description Edit Indy, 2008-06-21 09:51 The patch in "diff -urN" format.
Messages (2)
msg68493 - (view) Author: Aristotelis Mikropoulos (Indy) Date: 2008-06-21 09:51
Simplified some of the code, improving performance and readability.
msg69529 - (view) Author: Facundo Batista (facundobatista) * (Python committer) Date: 2008-07-11 02:43
If readability is enhanced is questionable, but is rejected on the basis
that cosmetic-only changes are not generally recommended: only
difficults following the code evolution in the repository.

The only change that I see regarding performance is the one involving
startswith, and it's actually wrong:

facundo@pomcat:~$ -s "s='qwerty'" "s[0]=='q';s[0]=='x'"
1000000 loops, best of 3: 0.338 usec per loop
facundo@pomcat:~$ -s "s='qwerty'"
1000000 loops, best of 3: 0.854 usec per loop

Thanks anyway!
Date User Action Args
2008-07-11 02:43:59facundobatistasetstatus: open -> closed
resolution: rejected
messages: + msg69529
nosy: + facundobatista
2008-06-21 09:51:16Indycreate