public inbox for glibc-bugs-regex@sourceware.org
help / color / mirror / Atom feed
* [Bug regex/508] New: check_dst_limits is inefficient
@ 2004-11-04  9:04 bonzini at gnu dot org
  2004-11-09  7:55 ` [Bug regex/508] " bonzini at gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: bonzini at gnu dot org @ 2004-11-04  9:04 UTC (permalink / raw)
  To: glibc-bugs-regex

This speeds up somewhat the failing test cases for bug 429.

The patch at http://sources.redhat.com/ml/libc-alpha/2004-11/msg00018.html can
already speed up the problematic function by a large amount. 
search_cur_bkref_entry disappears from the profile, and on a reduced testcase
(intermediate between the succeeding and failing testcases)
check_dst_limits_calc_pos is cut to about half the time it used to take.

This is done by hoisting most checks in check_dst_limits_calc_pos out of the
recursive calls, and by optimizing the loops on the backreference cache entries.
   The backreference cache is kept ordered by str_idx, so these loops have two
exit conditions: 1) the backref cache has ended, and 2) we got past this
str_idx.  By flagging the last backreference cache entry for each str_idx, we
can test that there is an entry for our str_idx only on the first iteration (and
sometimes we know there is one), and the flag on every subsequent iteration.

-- 
           Summary: check_dst_limits is inefficient
           Product: glibc
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: regex
        AssignedTo: bonzini at gnu dot org
        ReportedBy: bonzini at gnu dot org
                CC: glibc-bugs-regex at sources dot redhat dot com,glibc-
                    bugs at sources dot redhat dot com
OtherBugsDependingO 429,500
             nThis:


http://sources.redhat.com/bugzilla/show_bug.cgi?id=508

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug regex/508] check_dst_limits is inefficient
  2004-11-04  9:04 [Bug regex/508] New: check_dst_limits is inefficient bonzini at gnu dot org
@ 2004-11-09  7:55 ` bonzini at gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: bonzini at gnu dot org @ 2004-11-09  7:55 UTC (permalink / raw)
  To: glibc-bugs-regex


------- Additional Comments From bonzini at gnu dot org  2004-11-09 07:54 -------
Patch applied.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


http://sources.redhat.com/bugzilla/show_bug.cgi?id=508

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-11-09  7:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-04  9:04 [Bug regex/508] New: check_dst_limits is inefficient bonzini at gnu dot org
2004-11-09  7:55 ` [Bug regex/508] " bonzini at gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).