[Newbies] Re: Binary file I/O performance problems

Yoshiki Ohshima yoshiki at vpri.org
Fri Sep 5 23:27:57 UTC 2008


At Fri, 5 Sep 2008 14:49:29 -0700,
David Finlayson wrote:
> 
> Unfortunately, the data is not a simple block of floats. For example,
> in C here is how I read a "ping" header block from one of our vendors
> formats:

  I'm sure that there are other implications, but it sounds like you
do need some primitives to make it efficient.  I would make a
primitive that is equivalent of read_xyza_ping() that fills a Squeak
object, or if you are dealing with array of XYZA_Ping structure,
making an array of homogeneous arrays so that all linenames are stored
in a ByteArray, all pingnums are stored in a WordArray, etc.  In this
way, you may still be able to utilize the vector primitives.

-- Yoshiki


More information about the Beginners mailing list