This is the mail archive of the glibc-bugs@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regex/501] transit_state is slow


------- 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]