Subject: bug#73721: grep perf docs barely mention mem usage

From: Paul Eggert <[email-masked]>
Date: Wed, 9 Oct 2024 21:11:23 -0700

On 2024-10-09 14:12, [email-masked] wrote:
> With mmap(), the kernel just needs to set up a bit of book-keeping

Yes, I'm sure than in some cases mmap would be a win. However, all in 
all it was found not to be, and I expect that the hassle of maintaining 
the mmap variant wasn't worth whatever benefits it provided. As I recall 
'grep' wants to modify its input buffers for other efficiency reasons, 
and mmap CoW likely won't be a performance win over page-aligned read.

We could be proved wrong by someone taking the time to resurrect --mmap 
and doing performance measurements of realistic benchmarks. I don't have 
the time for that, myself.