[New-bugs-announce] [issue18832] New regex module degrades re performance

Tal Weiss report at bugs.python.org
Sun Aug 25 19:26:23 CEST 2013


New submission from Tal Weiss:

All tests I ran comparing timing of the new regex module relative to the old re module showed significant slower performance.
I'm attaching test code with regular expressions from our production server.
Tested on Python 2.7, 64 bit Linux + 64 bit Windows 7.
regex #0 match success = 0.16530585289 seconds
re    #0 match success = 0.0977821350098 seconds
regex #0 match failure = 0.460994958878 seconds
re    #0 match failure = 0.249558925629 seconds
regex #1 match success = 0.0802597999573 seconds
re    #1 match success = 0.0348429679871 seconds
regex #1 match failure = 0.224385023117 seconds
re    #1 match failure = 0.104065895081 seconds
regex #2 match success = 0.0307199954987 seconds
re    #2 match success = 0.0200390815735 seconds
regex #2 match failure = 0.0253899097443 seconds
re    #2 match failure = 0.0161480903625 seconds

----------
components: Regular Expressions
files: play_regex.py
messages: 196153
nosy: Tal.Weiss, ezio.melotti, haypo, mrabarnett, pitrou, serhiy.storchaka
priority: normal
severity: normal
status: open
title: New regex module degrades re performance
type: performance
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4
Added file: http://bugs.python.org/file31464/play_regex.py

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


More information about the New-bugs-announce mailing list