52 ms·
I'd forgotten to upgrade grep on my latest Macbook. In a large source code repo, looking for a fixed string with no wildcards: osx grep -r: real 2m37.786s
by tlb 4y ago
I'd forgotten to upgrade grep on my latest Macbook. In a large source code repo, looking for a fixed string with no wildcards:
osx grep -r:
real 2m37.786s
user 2m27.034s
sys 0m3.958s
ggrep -r:
real 0m12.842s
user 0m5.754s
sys 0m2.825s
which is the difference between something I'd avoid and something I'll use.
- mpweiher 4y agoDid you try setting the locale for OSX grep? LC_CTYPE=C https://news.ycombinator.com/item?id=4841168 https://news.ycombinator.com/item?id=4841168
- potatoalienof13 4y agoDid you make sure to clear the filesystem cache between each run?
- tlb 4y agoThe cache was warm for both measurements, which is more typical of my dev environment.