$ time fgrep -c "Steam" /tmp/steamstrings
241
grep --color=auto --exclude-dir={.bzr,CVS,.git,.hg,.svn,.idea,.tox,.venv,venv 0.09s user 0.03s system 99% cpu 0.112 total
$ time rg -c Steam /tmp/steamstrings
241
rg -c Steam /tmp/steamstrings 0.03s user 0.02s system 92% cpu 0.054 total
$ time ~/source/other/krep/krep "Steam" /tmp/steamstrings
Found 2226035 matches
Search completed in 0.0338 seconds (5991.67 MB/s)
Search details:
- File size: 202.56 MB
- Pattern length: 5 characters
- Using AVX2 acceleration
- Case-sensitive search
~/source/other/krep/krep "Steam" /tmp/steamstrings 0.08s user 0.02s system 225% cpu 0.045 total
So krep is:1. Extremely fast
2. Extremely inaccurate
3. Not useful if you actually want to see what the lines actually are rather than just knowing how many there aren't
Not to be facetious, but if the goal is to write a program that gives incorrect output as fast as possible I don't think you need to go as far as using AVX2.