I confirmed your performance results on my platform: the change makes test case "k" about 60% faster and test case "l" about 14% slower. At this point we're just in bugfix mode so this patch can wait. It'd be nice if it didn't slow down the short-line case so much. Also, I wonder how well this change works for "typical" searches. (I realize that "typical" is hard to define....)
I don't think we need to complicate the code to improve optimization
with older compilers. People who really care about performance will use
newer compilers anyway. So let's focus on
0001-dfa-speed-up-at-initial-state.patch.
- bug#17576: [PATCH] dfa: speed-up at initial state Norihiro Tanaka
- bug#17576: [PATCH] dfa: speed-up at initial state Paul Eggert
- bug#17576: [PATCH] dfa: speed-up at initial state Jim Meyering
- bug#17576: [PATCH] dfa: speed-up at initial state Norihiro Tanaka
- bug#17576: [PATCH] dfa: speed-up at initial s... Norihiro Tanaka
- bug#17576: [PATCH] dfa: speed-up at initi... Paul Eggert
- bug#17576: [PATCH] dfa: speed-up at ... Norihiro Tanaka
- bug#17576: [PATCH] dfa: speed-up at initial state Paul Eggert
- bug#17576: [PATCH] dfa: speed-up at initial state Norihiro Tanaka
- bug#17576: [PATCH] dfa: speed-up at initial s... Paul Eggert
- bug#17576: [PATCH] dfa: speed-up at initi... Norihiro Tanaka