protocol for using InputRanges
Dmitry Olshansky
dmitry.olsh at gmail.com
Fri Mar 28 11:40:44 PDT 2014
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.
--
Dmitry Olshansky
More information about the Digitalmars-d
mailing list