iopipe v0.0.4 - RingBuffers!

Dmitry Olshansky dmitry.olsh at gmail.com
Fri May 11 11:47:29 UTC 2018


On Friday, 11 May 2018 at 09:55:10 UTC, Kagamin wrote:
> On Thursday, 10 May 2018 at 23:22:02 UTC, Steven Schveighoffer 
> wrote:
>> However, I am struggling to find a use case for this that 
>> showcases why you would want to use it. While it does work, 
>> and works beautifully, it doesn't show any measurable 
>> difference vs. the array allocated buffer that copies data 
>> when it needs to extend.
>
> Depends on OS and hardware. I would expect mmap implementation 
> to be slower as it reads file in chunks of 4kb and relies on 
> page faults.

It doesn’t. Instead it has a buffer mmaped twice side by side. 
Therefore you can avoid copy at the end when it wraps around.

Otherwise it’s the same buffering as usual.



More information about the Digitalmars-d-announce mailing list