On 3/28/14, 11:40 AM, Dmitry Olshansky wrote:
28-Mar-2014 22:29, Walter Bright пишет:
On 3/28/2014 10:11 AM, Dmitry Olshansky wrote:
WAT? The overhead is in issuing system calls, you'd want to do as
little of them
as possible. Reading byte by byte is an exemplar of idiocy in I/O code.
That's why we have things like byLine().
Which uses C's BUFFERED I/O and it reads from it byte by byte via getc.
Even though sys calls are amortized by C runtime, we have a function
call per byte. No wonder it's SLOW.
byLine doesn't use getc. -- Andrei