buffered input

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Feb 5 07:02:47 PST 2011


On 2/5/11 2:45 AM, Michel Fortin wrote:
> One thing I'm wondering is whether it'd be more efficient if we could
> provide our own buffer to be filled. In cases where you want to preserve
> the data, this could let you avoid double-copying: first copy in the
> temporary buffer and then at the permanent storage location. If you need
> the data only temporarily however providing your buffer to be filled
> might be less efficient for a range that can't avoid copying to the
> temporary buffer for some reason..

Generally when one says "I want the stream to copy data straight into my 
buffers" this is the same as "I want the stream to be unbuffered". So if 
you want to provide your own buffers to be filled, we need to discuss 
refining the design of unbuffered input - for example by adding an 
optional routine for bulk transfer to input ranges.

Andrei


More information about the Digitalmars-d mailing list