Terry J. Reedy <tjre...@udel.edu> added the comment:

Is
        str = str.replace('xxxxxxxx', 'x')
        str = str.replace('xxxx', 'x')
        str = str.replace('xx', 'x')
        str = str.replace('xx', 'x')
really faster than
        _squashex = re.compile('x+').sub  # top of file
        _squashex('x', str)

And are the name bindings faster that regex.func(...)?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32880>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to