HANDLE versus stdio (was: [squeak-dev] Faster FileStream experiments)

Igor Stasenko siguctua at gmail.com
Thu Dec 3 18:19:30 UTC 2009


2009/12/3 David T. Lewis <lewis at mail.msen.com>:
> On Fri, Nov 27, 2009 at 11:24:37PM +0100, Nicolas Cellier wrote:
>>
>> I wonder why level 3 stdio was used (FILE * fopen, fclose ...) rather
>> than level 2 (int fid, open, close, ...) in file plugin... Better
>> portability ?
>>
>> Nicolas
>
> This is an interesting question, and I wonder if anyone has ever measured
> the difference between the two approaches.
>
> In the Windows VM, FilePlugin uses the standard win32 interface interacting
> with HANDLE rather than (FILE *). The other VMs use stdio in the file
> plugin. Loosely speaking, the Windows VM is using "level 2", while the
> other VMs are working at "level 3".
>
> Has anyone ever measured the file IO performance of an image running
> on the Windows VM versus a Unix or Mac VM on the same hardware? The
> plugin could be written in either manner on any of the platforms, so
> it would be interesting to know if one approach delivers better overall
> results than the other.
>

Well, its quite nontrivial task to compare IO performance between
platforms, because there many other things involved.
One could run faster than other, but you can't tell exactly it is
because of use of different IO functions in primitives, because it
could be because of different reasons, like memory management, the way
how OS scheduling CPU etc.

> Dave
>
>
>



-- 
Best regards,
Igor Stasenko AKA sig.



More information about the Squeak-dev mailing list