[issue1662581] the re module can perform poorly: O(2**n) versus O(n**2)

Dan report at bugs.python.org
Wed Oct 21 21:28:43 CEST 2009


Dan <witten at torsion.org> added the comment:

Here's an easy way to trigger the poor performance. Tested with 2.5,
2.6, and 2.7:

re.compile( '(\s+.*)*x' ).search( 'a ' * 30 )

----------
nosy: +witten

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1662581>
_______________________________________


More information about the Python-bugs-list mailing list