[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #23321] Epsclosure speedup patch

From: Johan Walles
Subject: [bug #23321] Epsclosure speedup patch
Date: Thu, 22 May 2008 18:02:22 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20080313 Iceape/1.1.9 (Debian-1.1.9-3)


                 Summary: Epsclosure speedup patch
                 Project: grep
            Submitted by: walles
            Submitted on: torsdag 2008-05-22 den 20:02
                Category: None
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any




My system frequently spends 20% CPU time on clearing memory in grep's
epsclosure() function (*).

The memory area being cleared (it's called "visited") consists of ints, that
are used to store values 0 and 1.

Replacing the ints with chars makes the memory area to clear one quarter of
the size.  Which obviously makes the memset() operation go four times as

Please apply the attached patch (it's relative to 2.5.3).  In the development
branch simply changing the visited declaration and the CALLOC call is enough.

  Regards //Johan

(*) http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=450649


File Attachments:

Date: torsdag 2008-05-22 den 20:02  Name: fasterEpsclosure.patch  Size: 555 B
  By: walles
epsclosure() speedup patch


Reply to this item at:


  Meddelandet skickades via/av Savannah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]