Adding a read primitive to ranges
Alex Parrill via Digitalmars-d
digitalmars-d at puremagic.com
Mon May 4 16:20:55 PDT 2015
On Monday, 4 May 2015 at 19:23:08 UTC, Freddy wrote:
> On Monday, 4 May 2015 at 15:16:25 UTC, Alex Parrill wrote:
>
> The ploblem is that all the functions in
> std.range,std.algorithm and many other wrappers would ignore
> byChucks and produce much slower code.
How so? `file.byChunks(4096).joiner` is a range that acts as if
you read each byte out of the file one at a time, but actually
reads them in 4096-byte buffers. It's still compatible with all
of the range and algorithm functions.
More information about the Digitalmars-d
mailing list