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 pitrou
Recipients Arfrever, bkabrda, christian.heimes, fweimer, georg.brandl, gregory.p.smith, iankko, lemburg, mpessas, pitrou, tim.peters, timehorse, vstinner
Date 2013-05-17.09:23:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1368782596.37.0.813766361391.issue17980@psf.upfronthosting.co.za>
In-reply-to
Content
Non-greedy matching actually makes things worse :-)

$ ./python -m timeit -s "import re; pat = re.compile('\A*a*a*a\Z'.replace('*', '[^.]+'), re.IGNORECASE)" "pat.match('a' * 100 +'z')"
100 loops, best of 3: 3.31 msec per loop

$ ./python -m timeit -s "import re; pat = re.compile('\A*a*a*a\Z'.replace('*', '[^.]+?'), re.IGNORECASE)" "pat.match('a' * 100 +'z')"
100 loops, best of 3: 6.91 msec per loop
History
Date User Action Args
2013-05-17 09:23:16pitrousetrecipients: + pitrou, lemburg, tim.peters, georg.brandl, gregory.p.smith, vstinner, christian.heimes, timehorse, Arfrever, iankko, bkabrda, fweimer, mpessas
2013-05-17 09:23:16pitrousetmessageid: <1368782596.37.0.813766361391.issue17980@psf.upfronthosting.co.za>
2013-05-17 09:23:16pitroulinkissue17980 messages
2013-05-17 09:23:16pitroucreate