On 6/22/20 4:16 PM, Ilkka Virta wrote:
> On 22.6. 19.35, Chet Ramey wrote:
>> On 6/22/20 1:53 AM, Jason A. Donenfeld wrote:
>>> Currently a static sized buffer is used for reading files. At the moment
>>> it is extremely small, making parsing of large files extremely slow.
>>> Increase this to 4k for improved performance.
>>
>> I bumped it up to 1024 initially for testing.
> 
> It always struck me as odd that Bash used such a small read of 128 bytes.
> Most of the GNU utils I've looked at on Debian use 8192, and a simple test
> program seems to indicate glibc's stdio reads 4096 bytes at one read() call.

Yes, 128 is too small for modern systems. It made more sense when the code
was written.


-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to