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 #61 received at 17229 <at> debbugs.gnu.org (full text, mbox):

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: Norihiro Tanaka <noritnk <at> kcn.ne.jp>, 17229 <at> debbugs.gnu.org
Subject: Re: bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in
 Boyer-Moore searching
Date: Sun, 27 Apr 2014 21:05:32 -0700
On Sun, Apr 27, 2014 at 1:32 PM, Paul Eggert <eggert <at> cs.ucla.edu> wrote:
> Anyway, an 18% speedup is still a speedup, so I looked into it.  GCC 4.9.0
> misses a non-obvious opportunity for function inlining.  I installed a tweak
> (attached) that should make the inlining opportunity obvious to compilers
> nowadays.  On my platform this gave a 28% speedup, i.e., a bit better than
> the macro-using patch would have.

Very nice.  I measured a 34% improvement on an i7-3615QM with -O2 and
gcc built from git (4.10.0 20140424)




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.