Re: memory

new topic     » goto parent     » topic index » view thread      » older message » newer message

Kat wrote:

> On 13 Jul 2001, at 10:53, euphoria at carlw.legend.uk.com wrote:
>
> >
> > > That way makes 6.8 million file accesses.
> >
> > Actually it's more like 850 file accesses. Euphoria has a built in 8k
> > buffer. A couple of years ago I made a suggestion (on the old mailing
list)
> > for Rob C. to make the buffer size variable. He provided a few good
reasons
> > why he [w|c|sh]ouldn't do it, none of which I can remember right now...
;-|
>
> Eu manages it's own disk buffers? Cool,, but if it doesn't,, then it's the
OS doing the
> buffering, and that means Eu is still doing 6.8 million file accesses,
even if the OS
> buffers the access to the hardware.

Whether it's the OS or Euphoria the number of file accesses doesn't really
matter. For 8191 out of every 8192 (or whatever) pseudo-file accesses, the
access is as fast as a memory access rather than a disk access. It should be
just as fast as using a sequence. Admittedly there is the 1 other access to
the file that takes a little longer. :)

Playing with the numbers revealed one of Rob's reasons for not increasing
the buffer size... The slowdown is always 12% (comparing seq->seq and
file->seq) no matter how big the OS/Eu buffer is. Doing your own buffering
may offer a speed increase only because you have _access_ to the buffer with
Euphoria it seems.

Carl

--
Carl R White - aka - Cyrek
eMail: carlw at legend.co.uk
       cyrek at bigfoot.com
URL:   nope none nada zip

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu