Norihiro Tanaka wrote: > Now I wrote the additional patch. Sorry, I don't understand that patch. I applied your earlier patch (attachment 1) and then merged that patch (attachment 2), but the resulting 'grep' failed 'make check'; I got a "FAIL: fedora" and the test after "file" never finished. This was on Fedora 20 x86-64 with my own installation of GCC 4.9.0. Instead of trying to understand that patch, I wrote a different patch (attachment 3) that simplifies the code and removes the part that is x86-specific. This improves the performance quite a bit for the test case given in the ChangeLog entry. I also tested performance on Sparc Solaris 10, and memchr was a big win there. Perhaps there are platforms where memchr is a big loss, but we can cross that bridge if we come to it. Perhaps I merged that patch incorrectly, so I'll leave this bug open for now. To be honest I hope that patch doesn't improve performance significantly if we get it to work correctly, as it looks tricky.