protocol for using InputRanges

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Mar 28 19:47:57 PDT 2014


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



More information about the Digitalmars-d mailing list