3 ms·
One thing worth noting is that the author of this post is using OS X. The default ancient BSD versions of the tools they are using (cut, tr, sort) are HORRIBLY
by justinsaccount 11y ago
One thing worth noting is that the author of this post is using OS X. The default ancient BSD versions of the tools they are using (cut, tr, sort) are HORRIBLY SLOW:
$ wc -l big.log
1058408 big.log
$ cat big.log |time gtr -d \" > /dev/null
0.38 real 0.21 user 0.14 sys
$ cat big.log |time tr -d \" > /dev/null
20.97 real 20.77 user 0.10 sys
$ cat big.log | time gcut -f 4 > /dev/null
0.61 real 0.59 user 0.01 sys
$ cat big.log | time cut -f 4 > /dev/null
2.99 real 2.95 user 0.02 sys
$ cat big.log | time gsort > /dev/null
28.52 real 27.03 user 0.80 sys
$ cat big.log | time sort > /dev/null
54.80 real 53.20 user 0.85 sys
If you are using OS X you owe it to yourself to install a non-broken userland. It's clear that apple doesn't give a shit about unix at this point.
- justinsaccount 11y agooh, forgot one. wc itself: $ time gwc -l big.log 1058408 big.log real 0m0.063s user 0m0.020s sys 0m0.041s $ time wc -l big.log 1058408 big.log real 0m0.251s user 0m0.211s sys 0m0.040s
- dguaraglia 11y agoWhat installation do you recommend? Anything I can brew right away? EDIT: I found this article https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-c...
- jsmthrowaway 11y ago> It's clear that apple doesn't give a shit about unix at this point. Er, is it? Clear to whom? It certainly isn't clear to me. Data does not support conclusion. In the slightest. I'm guessing based on your tone and the choice of certain adjectives in your rant that you're unaware of the reasons why the OS X userland isn't based on GNU, or you're choosing to ignore them. You have a bug report. File it. The hyperbole can be omitted, does nobody any good, and makes me unconsciously inclined to ignore the rest of your interesting observation (which is unfair to you).