GNU bug report logs - #17229
[PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Wed, 9 Apr 2014 13:56:02 UTC

Severity: normal

Tags: moreinfo, patch

Done: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Bug is archived. No further changes may be made.

Full log


Message #55 received at 17229 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 17229 <at> debbugs.gnu.org
Subject: bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in
 Boyer-Moore searching
Date: Sun, 27 Apr 2014 16:57:21 +0900
[Message part 1 (text/plain, inline)]
Thanks for the improvement with memchr2().  It's very great!

Paul Eggert wrote:
> If there is a reason to use macros I'd like to see a patch that simply
> changes functions to macros without changing the algorithm, so that we
> can measure this effect separately from the algorithm change.

I tested with below.

  yes jjjjjjjjjjjjjjjjjjjj | head -10000000 >k
  env LC_ALL=C time -p src/grep kjjjjjjjjjjjjjjjjjjj k

The performance with the current master is as following.

    real 2.95       user 2.44       sys 0.45

After changes function to macros.

    real 1.09       user 0.59       sys 0.43

Could you try above cases?

Norihiro
[patch.txt (text/plain, attachment)]

This bug report was last modified 11 years and 105 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.