2010/1/21 Stéphane Ducasse <[email protected]>:
> Hi levente
>
> I was wondering why the bufferedFileStream made the system faster.
> I mean are querying the same contents on several occasion?
>
> Stef
>

My interpretation is this one:

Overhead time spent > core time required.
Whether you read/write 1 byte or 2000 bytes, the cost of the primitive
call + underlying system call (fread/fwrite) is almost the same
(overhead time is dominating).
If you issue 2000 primitive calls for reading bytes 1 by 1, or a
single for reading all at once, the main difference is 1999*overhead.
The buffer use a much faster primitive ByteString/ByteArray
#at:/at:put:, so it does not count.

Nicolas

> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to