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

I did the comparison if anyone is curious.

dash is faster but not as much as I'd expected:

    $ time yes | bash mill | pv -S -s "$FIVE_MEGS" > /dev/null
       5MiB 0:00:24 [ 208KiB/s] [====================================================>] 100%            

    real 0m24.614s
    user 0m21.338s
    sys 0m11.749s

    $ time yes | ksh93 mill | pv -S -s "$FIVE_MEGS" > /dev/null
       5MiB 0:00:11 [ 447KiB/s] [====================================================>] 100%            

    real 0m11.451s
    user 0m6.480s
    sys 0m12.441s

    $ time yes | dash mill | pv -S -s "$FIVE_MEGS" > /dev/null
       5MiB 0:00:07 [ 663KiB/s] [====================================================>] 100%            

    real 0m7.720s
    user 0m4.687s
    sys 0m8.934s

awk is super fast as expected:

    $ time yes | awk '{ print $0 }' | pv -S -s "$FIVE_MEGS" > /dev/null
       5MiB 0:00:00 [11.5MiB/s] [====================================================>] 100%            

    real 0m0.439s
    user 0m0.444s
    sys 0m0.011s


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: