On Sunday, 9 August 2015 at 00:50:16 UTC, Ali Çehreli wrote:
Ali

Now benchmarks write and read separately:

https://github.com/nordlow/justd/blob/0d746b2c1800a82a61a6cb7edcabfd9664066b2c/tests/t_rawio.d

Couldn't the chunk logic be deduced aswell? Something like:

void rawWriteInAutoChunks(R)(File f, R r)
{
const count = preferred_disk_write_size / sizeof(ElementType!R);
    return r.chunks(count).each!(a => f.rawWrite(a.array));
}

What would a suitable value for `preferred_disk_write_size` be?

Reply via email to