GNU bug report logs -
#17229
[PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching
Previous Next
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
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Paul Eggert 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.
You are right. My compiler was too old. It was GCC 4.1.2 on CentOS 5.10.
I retried it with GCC 4.4.7, and got the good performance.
# Although I tried to build GCC 4.9.0, it hasn't carried out well yet.
By the way, I examined the reason why it was slow on GCC 4.1.2, and I
found that tr() isn't inlining without `-finline-loops' option, because
`-finline-small-functions' option can be used from GCC 4.3. Although I
submit the patch, it mayn't be so important.
Thanks,
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.