FWIW my locale is en_GB.utf-8 and I also get no difference (in fact, the version with locale is slightly faster than without), with GNU grep 2.14 on OSX 10.9.
The built-in BSD grep (2.5.1-FreeBSD) also runs in 30% of the time GNU grep does.
Re:Make grep 50x faster
by a8da6b0c91d on Sunday December 15, 2013 @06:45PM
(#6911663)
I just did 'strings /dev/urandom > stuff' for 100M.
Got it in memory first with untimed grep, then:
$ time grep -i blah stuff
bLAH
blAH
real 0m7.227s
user 0m7.194s
sys 0m0.011s
$ time LANG=C grep -i blah stuff
bLAH
blAH
real 0m0.486s
user 0m0.467s
sys 0m0.016s
So a pretty big difference. My default lang is en_US.utf8.
I'm still surprised that TFA can claim such a speedup, I would have thought IO speed was the bottleneck when you grep through a big amount of data.
As an other poster mentioned I wonder if the speedup is not mainly disk caching in RAM during the 2nd run.