Message189434
| 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:16 | pitrou | set | recipients:
+ pitrou, lemburg, tim.peters, georg.brandl, gregory.p.smith, vstinner, christian.heimes, timehorse, Arfrever, iankko, bkabrda, fweimer, mpessas |
| 2013年05月17日 09:23:16 | pitrou | set | messageid: <1368782596.37.0.813766361391.issue17980@psf.upfronthosting.co.za> |
| 2013年05月17日 09:23:16 | pitrou | link | issue17980 messages |
| 2013年05月17日 09:23:16 | pitrou | create |
|