Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I just replicated the test and I can confirm the FreeBSD grep compiled on Darwin is about 30x slower.

    % /usr/local/bin/grep --version         
    /usr/local/bin/grep (GNU grep) 2.14
    <snip>

    % time find . -type f | xargs /usr/local/bin/grep 83ba
    find . -type f  0.01s user 0.06s system 8% cpu 0.870 total
    xargs /usr/local/bin/grep 83ba  0.66s user 0.31s system 95% cpu 1.017 total


    % /usr/bin/grep --version                 
    grep (BSD grep) 2.5.1-FreeBSD

    % time find . -type f | xargs /usr/bin/grep 83ba 
    find . -type f  0.01s user 0.06s system 0% cpu 28.434 total
    xargs /usr/bin/grep 83ba  31.65s user 0.40s system 99% cpu 32.113 total


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: