bug-grep
[Top][All Lists]
Advanced

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

Re: [bug #23321] Epsclosure speedup patch


From: Aharon Robbins
Subject: Re: [bug #23321] Epsclosure speedup patch
Date: Fri, 23 May 2008 12:06:26 +0300

> Date: Fri, 23 May 2008 03:03:11 -0300
> From: Tony Abou-Assaleh <address@hidden>
> Subject: Re: [bug #23321] Epsclosure speedup patch
> To: Johan Walles <address@hidden>
> Cc: address@hidden
>
> Johan Walles wrote:
> > Follow-up Comment #1, bug #23321 (project grep):
> > 
> > The just attached file shows grep benchmark results.  I got the patterns 
> > file
> > by doing:
> > 
> > cat /etc/logcheck/ignore.d.workstation > /tmp/ignore
> > 
> > The numbers show the startup time for grep with about 2500 regexps read from
> > a file (logcheck does this every hour) is:
> > Plain 2.5.3    : 68.0s
> > CALLOC patch   : 24.2s
> > int->char patch:  5.8s
> > 
> > Adding 10000 lines of input (my /var/log/daemon.0 log file) doesn't change
> > the numbers much:
> > Plain 2.5.3    : 70.4s
> > 
> > Both CALLOC and
> > int->char patch:  5.7s
>
> The numbers look very promising. Thanks Johan. The CALLOC line is 
> already in the latest source in the CVS. If no one objects in the next 
> few days, the int->char change will be applied.
>
> If you find similar (or other) inefficiencies in the code, I will 
> happily apply correcting patches.

Note this in the gawk CVS changelog:

Sun Jan 13 08:16:38 2008  Arnold D. Robbins  <address@hidden>

        * dfa.c (epsclosure): Replace MALLOC + zero-out-loop with CALLOC for
        large potential speedup, based on bug report to bug-grep list from
        Johan Walles <address@hidden>.
        (dfaanalyze): Made a similar change.

So, I suggest looking at dfaanalyze also. I'm going to look there to see if
an int -> char change may help too.

Thanks,

Arnold




reply via email to

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