Andrei Alexandrescu wrote: > >This will happen all the more if you have multiple threads. > >You clearly have a good expertise on OS, I/O, and related matters, and >I am honoured by your presence and by the value you're adding to this >group. However, in this particular argument you're only firing blanks. >Are you sure you have a case? > > >Andrei
So why don't we benchmark this? Here's a first, naive attempt: https://gist.github.com/1184671 There's not much to do for the sync implementation, but the async one should maybe keep a pool of buffers and reuse those. However, the async implementation was already ~10% faster in simple tests (copying a 700mb ubuntu .iso; source and target on the same harddisk). I wouldn't have expected this, but it seems the async copy is actually be faster. -- Johannes Pfau