[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore s
From: |
Norihiro Tanaka |
Subject: |
bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching |
Date: |
Mon, 28 Apr 2014 21:45:55 +0900 |
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
Description: Text document
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, (continued)
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Paul Eggert, 2014/04/24
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Norihiro Tanaka, 2014/04/25
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Norihiro Tanaka, 2014/04/25
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Eric Blake, 2014/04/25
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Norihiro Tanaka, 2014/04/25
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Norihiro Tanaka, 2014/04/26
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Paul Eggert, 2014/04/27
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Norihiro Tanaka, 2014/04/27
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Paul Eggert, 2014/04/27
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Jim Meyering, 2014/04/28
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching,
Norihiro Tanaka <=
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Paul Eggert, 2014/04/29
- bug#17229: [PATCH 2/2] grep: speed-up by using memchr() in Boyer-Moore searching, Norihiro Tanaka, 2014/04/30