- Won't specifying 0 (zero) for the second parm to mmap try to load the whole 21GB into ram?
If you specify a smaller size, you'll miss search terms that span buffers.
- Will produce multiple hits per record. See Re^2: Fastest Search method for strings in large file.
The qr is effectively redundant in both versions.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.