ByteArray unsignedLongAt: index bigEndian: aBool

Alan Grimes alangrimes at starpower.net
Wed Oct 12 00:05:06 UTC 2005


One of the biggest things slowing down Croquet's big demo when you first
open it is the method in the subject line...

Working in the image only I managed to tweak it down from 11.8% of the
startup time to 8.4%... (oops, that version was buggy, I only got it
down to 10.5%)

One of the things I noticed in doing this was that it seems to have a
bug in it where if I force it to be an unsigned long, Croquet behaves
quite badly. If I do the same operation but preserving the sign, it
works quite well... (even if I do that poorly, it still works...) There
might be a bug in a primitive somewhere in either BitAnd or BitShift...
(this is a stock VM as I havn't been able to pull the SVN sources due to
problems with my Linux distro...)

It would seem appropriate to expose something like the "integerAt"
functionality of the underlying VM in this method... (portability being
the biggest problem...) It is definitely hurting performance enough for
us to care..

Come to think of it, has anyone written an intro to the state of
primitives? There seem to be two or three distinct categories of
primitives with very little to explain them or how they should best be
used/extended these days...

If anyone is interested in my code for the above, ask..


-- 
Friends don't let friends use GCC 3.4.4
GCC 3.3.6 produces code that's twice as fast on x86!

http://users.rcn.com/alangrimes/



More information about the Squeak-dev mailing list