Odd

Andreas Raab raab at isgnw.cs.Uni-Magdeburg.DE
Mon Apr 20 09:24:28 UTC 1998


> I believe on most modern processors integer multiplies are single
> cycle instructions, just like shifts. On top of this, the Squeak
> << operator is not quite a primitive (it does a test, then calls
> the primitive), so there is one extra message send plus a few
> other bytecodes. Try using "bitShift:", which is a primitive,
> and you should see more comparable performance.

But probably not that of bytecodeMultiply since #bitShift: as well as #<<
require a message lookup in the class. And compared to a few machine
cycles for integer multiplication this is quite a lot.

Andreas
-- 
Linear algebra is your friend - Trigonometry is your enemy.
+===== Andreas Raab ============= (raab at isg.cs.uni-magdeburg.de) =====+
I Department of Simulation and Graphics      Phone: +49 391 671 8065  I
I University of Magdeburg, Germany           Fax:   +49 391 671 1164  I
+=============< http://isgwww.cs.uni-magdeburg.de/~raab >=============+





More information about the Squeak-dev mailing list