HANDLE versus stdio (was: [squeak-dev] Faster FileStream
cputney at wiresong.ca
Thu Dec 3 18:41:56 UTC 2009
On 3-Dec-09, at 10:12 AM, David T. Lewis wrote:
> In the Windows VM, FilePlugin uses the standard win32 interface
> 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".
Performance is certainly interesting, but to me it's mostly a question
design. FILE * is a high-level API, meant for C programmers to use
directly. A lot of what it provides is already implemented in the
For example, a FileStream has a position instance variable, but the
FilePlugin primitives also maintain a position, and we have to choose
between keeping them in sync or ignoring the image-level position.
Both of those are problematic. I'd like to see file IO primitives that
are implemented in terms of pread() and pwrite() or the like.
I like to primtives to be as primitive as possible. :-)
More information about the Squeak-dev