Re: [PATCH] Teach "git add" and friends to be paranoid
- From
Dmitry Potapov <dpotapov@gmail.com>
- Date
- Feb 22, 2010, 16:01 UTC
- Message-ID
- <37fcd2781002220801q2bdb553g15c0a99301a27283@mail.gmail.com>
- In-Reply-To
- <alpine.LFD.2.00.1002221033120.1946@xanadu.home>
On Mon, Feb 22, 2010 at 6:40 PM, Nicolas Pitre <nico@fluxnic.net> wrote:
> > read() is not always a winner. A read() call will always have the data > duplicated in memory. Especially with large files, it is more efficient > on the system as a whole to mmap() a 50 MB file rather than allocating
Agreed. I meant it was faster on data that I measured, which was <=1Mb. IMHO, read() should be used up to 64Kb.
Dmitry