Skip to content

Instantly share code, notes, and snippets.

@mranney
Created December 8, 2016 01:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mranney/fcdb8938872e340e256a79079a084d74 to your computer and use it in GitHub Desktop.
Save mranney/fcdb8938872e340e256a79079a084d74 to your computer and use it in GitHub Desktop.
GNU grep compiled on my MacBook Pro as "ggrep":
mranney-C02N31E1FD57:~$ time ggrep -E '^a(b|c)?' /usr/share/dict/words > /dev/null
real 0m0.020s
user 0m0.016s
sys 0m0.003s
mranney-C02N31E1FD57:~$ time grep -E '^a(b|c)?' /usr/share/dict/words > /dev/null
real 0m0.106s
user 0m0.101s
sys 0m0.004s
This is a 3GB version of "Tale of Two Cities", English language text:
mranney-C02N31E1FD57:~$ time ggrep -E '^a(b|c)?d' pg98_3g.txt > /dev/null
real 0m15.489s
user 0m14.873s
sys 0m0.598s
mranney-C02N31E1FD57:~$ time grep -E '^a(b|c)?d' pg98_3g.txt > /dev/null
real 0m53.903s
user 0m53.040s
sys 0m0.756s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment