PositionableStream>>uint32 etc...??

Chris Muller afunkyobject at yahoo.com
Wed Jul 9 23:05:37 UTC 2003


> I don't. But the author of Magma used primitives to do this for speed
> reasons.

Actually, Magma doesn't add any primitives whatsoever to Squeak.  It is 100%
Smalltalk.

Profiling various operations in Magma reveals that a lot of time is spent in
the two methods for getting/putting numbers into its ByteArray buffers:

  ByteArray>>maUint:at:

and

  ByteArray>>maUint:at:put:

Magma makes hundreds of thousands of calls to these two methods for
serialization, materialization, managing buffers, etc.  I tried to make them as
fast as possible by checking for <=32 bits in the first argument and using the
existing primitive under those conditions.  But for 64-bit numbers, the most
common, since Magma uses 64-bit oids, it relies on my Smalltalk implementation.

While they do run very fast, if these methods were made primitive, I'm sure
Magma would enjoy a nice turbo-boost.

Regards,
  Chris


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com



More information about the Squeak-dev mailing list