Created
November 28, 2012 11:52
-
-
Save stamm/4160699 to your computer and use it in GitHub Desktop.
speed grep from macos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#grep from macos | |
➜ tmp time /usr/bin/grep "GET /out" nginx-access_log.2 | wc -l | |
140858 | |
/usr/bin/grep "GET /out" nginx-access_log.2 26.49s user 0.28s system 97% cpu 27.443 total | |
wc -l 0.03s user 0.02s system 0% cpu 27.443 total | |
➜ brew install grep | |
➜ tmp time grep "GET /out" nginx-access_log.2 | wc -l | |
140858 | |
grep "GET /out" nginx-access_log.2 0.58s user 0.15s system 98% cpu 0.748 total | |
wc -l 0.03s user 0.01s system 6% cpu 0.747 total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment