bug-grep
[Top][All Lists]
Advanced

[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:1.8.1.13) Gecko/20080313 Iceape/1.1.9 (Debian-1.1.9-3)

URL:
  <http://savannah.gnu.org/bugs/?23321>

                 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

    _______________________________________________________

Details:

Hi!

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

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
<http://savannah.gnu.org/bugs/download.php?file_id=15699>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?23321>

_______________________________________________
  Meddelandet skickades via/av Savannah
  http://savannah.gnu.org/





reply via email to

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