[Newbies] Re: Binary file I/O performance problems
Herbert König
herbertkoenig at gmx.net
Sat Sep 6 09:45:39 UTC 2008
Hello David,
YO> I'm sure that there are other implications, but it sounds like you
YO> do need some primitives to make it efficient. I would make a
YO> primitive that is equivalent of read_xyza_ping() that fills a Squeak
YO> object, or if you are dealing with array of XYZA_Ping structure,
YO> making an array of homogeneous arrays so that all linenames are stored
YO> in a ByteArray, all pingnums are stored in a WordArray, etc. In this
YO> way, you may still be able to utilize the vector primitives.
this approach seems to give a chance of solving the sped problem.
In your original post you talked about 10 significant figures, so be
aware that float array only is 32 bit floats with only about 8
significant figures.
The second caveat is if many of your floats are in the range of 1e-38
(the closet to zero number of 32 Bit Float) Float array gets very slow
(speed degradation by a factor of 8). I'm talking about FloatArray>>*
and *= here.
Sorry if I sound negative I just think its bad to ignore problems that
are know in advance.
--
Cheers,
Herbert
More information about the Beginners
mailing list