Boost logo

Boost :

From: Slava, Alex (raf.devel_at_[hidden])
Date: 2006-05-20 04:09:57


On 5/19/06, Jonathan Ray <ray.jonathan.w_at_[hidden]> wrote:
> Olaf van der Spek <olafvdspek_at_[hidden]> wrote:
> >Is it possible to read a range of bytes with a single function call?
> >Or would that require one function call per byte?
>
> One function call per byte would be extremely inefficient because of
> I/O latency unless the library, the driver, or the drive itself does a
> lot caching with some prefetching. Generally drivers will work
> faster when you declare what you want to do in as few calls as
> possible rather than splitting it up into many sequential function
> calls, because the all-at-once approach gives the driver more latitude
> in which to optimize the operation.
Surely that one call per byte is extremely inefficient (stream and
stdio based model tests confirm this fact very well), but actually
there is no call in our model.
RAF[i] is not a "real" call. operator[] produces no real action, it is
just a wrapper to data[] and is inlined by compiler. Memory mapped
file is similar to array in memory, thus access is similar to memory
access. Difference is that this array is syncronized with real file,
but this is performed by OS internally, so no library or system calls
are required. OS uses virtual memory paging mechanism (the same as
paging file operation) to work with memory mapped files which is
highly optimized.

>
> I read the Performance section of the RAF paper and it seems they
> forgot to declare the units of the table and omitted any discription
> of the hardware that they ran the tests on. Those details are
> crucial.
>
We received many feedbacks about this section. It will be reworked
(new tests, more description, etc) soon.

> Cheers,
> Jonathan Ray

Thank you.

-- 
Svyatoslav Trukhanov,
Oleksii Ursulenko

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