Hello,

Andrew Gwozdziewycz wrote:
>> $ time find / | grep 'bin' > /dev/null
>> real    0m8.122s
>> user    0m3.101s
>> sys     0m2.519s
>>
>> $ time find / -regex 'bin' | grep
>> real    0m18.795s
>> user    0m3.394s
>> sys     0m3.401s

I get a different story on Linux 3.12.4:

[bpowers@fina ~]$ time find / 2>/dev/null | grep 'bin' > /dev/null
real 0m2.316s
user 0m1.145s
sys 0m1.480s

[bpowers@fina ~]$ time find / -regex 'bin' 2>/dev/null
real 0m2.132s
user 0m0.753s
sys 0m1.362s

[bpowers@fina ~]$ find --version | head -1
find (GNU findutils) 4.5.11

The find -regex is consistently about 10% faster.  Not much, but also
not > 2x slower like you see on OSX.

yours,
Bobby

Reply via email to