[New-bugs-announce] [issue8064] Large regex handling very slow on Linux

Oliver Sturm report at bugs.python.org
Fri Mar 5 00:14:46 CET 2010


New submission from Oliver Sturm <oliver at sturmnet.org>:

The code in regextest.py (attached) uses a large regex to analyze a piece of text. I have tried this test program on two Macs, using the standard Python distributions.

On a MacBook, 2.4 GHz dual core, Snow Leopard with Python 2.6.1, it takes 0.08 seconds
On a MacPro, 2.something GHz 8 core, Leopard with Python 2.5.1, it takes 0.09 seconds

Now I've also tried it on several Linux machines, all of them running Ubuntu. They are all extremely slow. The machine I've been testing with now is a 2.0 GHz dual core machine with Python 2.5.2. A test run of the program takes 97.5 (that's not a typo) seconds on this machine, 1200 times as long as on the Macs.

----------
components: Regular Expressions
files: regextest.py
messages: 100434
nosy: michael.foord, olivers
severity: normal
status: open
title: Large regex handling very slow on Linux
type: resource usage
versions: Python 2.5
Added file: http://bugs.python.org/file16440/regextest.py

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


More information about the New-bugs-announce mailing list