Message325074
Confirming the microoptimization here with a non-debug (opt) build:
~/oss/cpython$ sre-before/python -m timeit -s "import re; s = (b'~' * 1000000); f = re.compile(b'\s\w\d').search" "f(s)"
20 loops, best of 5: 11 msec per loop
~/oss/cpython$ sre-after/python -m timeit -s "import re; s = (b'~' * 1000000); f = re.compile(b'\s\w\d').search" "f(s)"
20 loops, best of 5: 10.1 msec per loop
Those results are consistent across reruns. |
|
| Date |
User |
Action |
Args |
| 2018-09-11 22:01:28 | gregory.p.smith | set | recipients:
+ gregory.p.smith |
| 2018-09-11 22:01:28 | gregory.p.smith | set | messageid: <1536703288.87.0.0269046726804.issue34636@psf.upfronthosting.co.za> |
| 2018-09-11 22:01:28 | gregory.p.smith | link | issue34636 messages |
| 2018-09-11 22:01:28 | gregory.p.smith | create | |
|