Boost logo

Boost :

From: Dylan Nicholson (dylan_nicholson_at_[hidden])
Date: 2002-03-19 17:32:43


 --- Rene Rivera <grafik666_at_[hidden]> wrote: > On 2002-03-19 at
04:37 PM, dylan_nicholson_at_[hidden] (Dylan Nicholson)
> wrote:
>
> >
> >I tested this copying a local ~200Kb file 50 times, so I don't know how
> >representative that is. All sorts of factors might be at play, but the
> results
> >were consistent.
>
> OK, how can you say "remarkably efficient" when you don't give us numbers,
> and
> you only compare two methods. How about comparing it to other methods like
> cstdio, raw io, or even (on some platforms) memory mapped files?
>
Well quite clearly it is remarkable, given the number of people who have
remarked on it :o) But I did do some other tests with bigger files, and using
a network etc. etc. In no case did I get a result perceptably slower than
using, for instance, the cp command. The point is my assumption was that such
a naive implementation would be horribly slow. It may simply be that the size
of the buffer used by the underlying implementation is well-tuned to the
filesystem. The fact that reading the whole file into one big buffer and
writing it all out in one go was so slow was extremely surprising to me.

Dylan

http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk