This is the mail archive of the
glibc-bugs@sources.redhat.com
mailing list for the glibc project.
[Bug regex/501] transit_state is slow
- From: "bonzini at gnu dot org" <sourceware-bugzilla at sources dot redhat dot com>
- To: glibc-bugs at sources dot redhat dot com
- Date: 11 Nov 2004 09:20:47 -0000
- Subject: [Bug regex/501] transit_state is slow
- References: <20041104085106.501.bonzini@gnu.org>
- Reply-to: sourceware-bugzilla at sources dot redhat dot com
------- Additional Comments From bonzini at gnu dot org 2004-11-11 09:20 -------
Here is a testcase. Timings taken on a PPC G4 at 1.5 GHz
time perl -e 'print "A" x 10000' | ./sed -n '/[A-Z].*[0-9]$/p'
without patch: 1.98s
with patch: 1.89s
time perl -e 'print "A" x 30000' | ./sed -n '/[A-Z].*[0-9]$/p'
without patch: 17.59s
with patch: 17.11s
In this case, regex complexity is quadratic. This is a savings of 2.7%; I
remember seeing slightly higher figures on x86.
--
http://sources.redhat.com/bugzilla/show_bug.cgi?id=501
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.