Arnim Rupp <[email protected]> added the comment:
some more observations, which might be helpful in tracking it down:
x$ is much faster than ^x
A$ is as slow as ^x
$ python3 -m timeit -s "a = 'A'*100000000" "import re" "re.search('x$', a)"
10 loops, best of 5: 32.9 msec per loop
$ python3 -m timeit -s "a = 'A'*100000000" "import re" "re.search('A$', a)"
1 loop, best of 5: 802 msec per loop
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue42885>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com