Comment

Georgi

>For both searching single files ..., no other tool obviously stands above ripgrep in either performance or correctness.

No, searching literals (i.e. exact matching) with Kazahana is superior, why, because the tool has the fastest memmem() function.
A quick example, on laptop with i7-3630QM:

```
Testfile: 13,113,340,782 OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt

Benchmarking literal (Exact Matching) "Now, Hercules and his little friends won't stand a chance" ...

F:\grep_vs_Kazahana>timer32.exe "Kazahana_Monad_GCC_472_SSE41_32bit.exe" "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" 520123

Kernel Time = 3.656 = 66%
User Time = 1.796 = 32%
Process Time = 5.453 = 99% Virtual Memory = 512 MB
Global Time = 5.475 = 100% Physical Memory = 513 MB

F:\grep_vs_Kazahana>timer32.exe "Kazahana_Monad_GCC_730_SSE41_64bit.exe" "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" 520123

Kernel Time = 3.718 = 75%
User Time = 1.203 = 24%
Process Time = 4.921 = 99% Virtual Memory = 511 MB
Global Time = 4.940 = 100% Physical Memory = 512 MB

F:\grep_vs_Kazahana>timer32.exe "Kazahana_r1-++fix+nowait_critical_nixFIX_WolfRAM+fixITER+EX+CS_fix_DEFINE_Trolldom_MONAD-Thread_IntelV15_SSE41_64bit.exe" "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" 520123

Kernel Time = 3.671 = 74%
User Time = 1.265 = 25%
Process Time = 4.937 = 100% Virtual Memory = 511 MB
Global Time = 4.911 = 100% Physical Memory = 512 MB

F:\grep_vs_Kazahana>timer32.exe "Kazahana_Hexadecad_GCC_730_SSE41_64bit.exe" "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" 520123

Kernel Time = 3.718 = 80%
User Time = 5.015 = 108%
Process Time = 8.734 = 188% Virtual Memory = 513 MB
Global Time = 4.627 = 100% Physical Memory = 514 MB

F:\grep_vs_Kazahana>timer32.exe "Kazahana_r1-++fix+nowait_critical_nixFIX_WolfRAM+fixITER+EX+CS_fix_DEFINE_Trolldom_HEXADECAD-Threads_IntelV15_SSE41_64bit.exe" "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt" 520123

Kernel Time = 7.671 = 137%
User Time = 30.140 = 539%
Process Time = 37.812 = 677% Virtual Memory = 515 MB
Global Time = 5.582 = 100% Physical Memory = 514 MB

F:\grep_vs_Kazahana>set LC_ALL=C

F:\grep_vs_Kazahana>timer32.exe grep.exe -F -c "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt"
1

Kernel Time = 3.375 = 19%
User Time = 14.375 = 80%
Process Time = 17.750 = 99% Virtual Memory = 2 MB
Global Time = 17.762 = 100% Physical Memory = 5 MB

F:\grep_vs_Kazahana>timer32.exe "ripgrep-11.0.1-x86_64-pc-windows-gnu.exe" -c "Now, Hercules and his little friends won't stand a chance" "OpenSubtitle_corpus_en_2018_(441,450,449_lines_FROM_446,612_files).txt"
1

Kernel Time = 2.953 = 42%
User Time = 4.000 = 57%
Process Time = 6.953 = 100% Virtual Memory = 26 MB
Global Time = 6.948 = 100% Physical Memory = 4096 MB
```