On Mon, 11 Jan 2010, Fredrik Kuivinen wrote:
Any ideas on how this can be explained?
Could it be a bad 'strstr()' implementation?
Try a complex pattern ("qwerty.*as" finds the same line), and see if that
too is slower than before. If that is faster than it used to be (with
--no-ext-grep, of course), then it's strstr() that is badly implemented.
For me, on x86-64 (Fedora-12), strstr() seems to do pretty well. But it's
easy to do a stupid implementation of strstr that does a 'strlen()' first,
for example, and thus always traverses all data _twice_ etc. Depending on
cache sizes etc, that can end up killing performance (or not mattering
much at all..)
Linus