Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!samsung!emory!ox.com!math.fu-berlin.de!opal!unido!unidui!hm279he From: hm279he@uni-duisburg.de (Heckes) Newsgroups: comp.lang.smalltalk Subject: Integer / Float arithmetic in ST80 Keywords: number classes, speed of floats, primitives Message-ID: Date: 15 May 91 11:57:02 GMT Sender: @unidui.uni-duisburg.de Organization: Rechenzentrum Uni-Duisburg Lines: 27 I am using ST80 from ParcPlace on 386PC under Windows. I plan to use the system for prototyping of numerical algorithems and if we get ST80 for our IBM6000 I will surely use them. To get an impression of the speed in number crunching, I performed some benchmarks with variables from the classes *Integer, Float and Double. As my PC is equipped with a coprocessor I expected class Float and SmallInteger to perform similar. I was very surprised, when it turned out that the simple integer arithmetic, like +,* etc, was 10 times faster then the equivalent messages in class Float. After looking a while around in the source code, I find that also both classes implement the messages as primitives, the messages in class SmallInteger are handled somewhat different. The messages in SmallInteger are marked essential and seem to be called in a different way as other primitives. There is a thing named Special Byte Code Selector which, as I understand, is send to the Compiler to make execution faster. My question is: Is it possible to make the Float messages perform as fast as the SmallInteger ones? Dirk dirk@hal9000.uni-duisburg.de Dirk Talkenberger Physics Department / Theoretical Low Temperature Physics