protocol for using InputRanges
w0rp
devw0rp at gmail.com
Fri Mar 28 17:18:37 PDT 2014
On Friday, 28 March 2014 at 22:05:33 UTC, Walter Bright wrote:
> On 3/28/2014 11:40 AM, Dmitry Olshansky wrote:
>> 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.
>
> How about a PR to fix it?
Yes. I hold the opinion that there is not a whole lot of reason
why something like byChunk can't be fast like we might desire. If
it's down to getting chunks of data the right way, whatever that
is, and the problem is an IO bound problem, then I don't see why
we can't submit pull requests to offer optimisations on it. I
don't think we need to go down this "the way it does IO isn't
fast enough so we need to replace it" route. Just optimise the
existing thing more.
More information about the Digitalmars-d
mailing list