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.

classification
Title: glob.py improvements
Type: performance Stage:
Components: Library (Lib) Versions: Python 2.5
process
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 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
glob.py.patch 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:~$ timeit.py -s "s='qwerty'" "s[0]=='q';s[0]=='x'"
1000000 loops, best of 3: 0.338 usec per loop
facundo@pomcat:~$ timeit.py -s "s='qwerty'"
"s.startswith('q');s.startswith('x')"
1000000 loops, best of 3: 0.854 usec per loop

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