Xref: utzoo comp.lang.smalltalk:3026 comp.object:3633 Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!dali.cs.montana.edu!uakari.primate.wisc.edu!sdd.hp.com!wuarchive!uunet!abvax!iccgcc!klimas From: klimas@iccgcc.decnet.ab.com Newsgroups: comp.lang.smalltalk,comp.object Subject: Re: Integer / Float arithmetic in ST80 (Some benchmarks) Message-ID: <4720.2844c7d7@iccgcc.decnet.ab.com> Date: 30 May 91 14:37:27 GMT References: <2322@media03.UUCP> <1991May21.222216.5429@m.cs.uiuc.edu> Lines: 45 In article <1991May21.222216.5429@m.cs.uiuc.edu>, johnson@cs.uiuc.EDU (Ralph Johnson) writes: > Peter Kriens explained why Floats are a lot slower in Smalltalk > than Integers. Although he was technically correct, he was > sociologically wrong. The reasons that Floats are slow in > Smalltalk are because they aren't use much; they aren't used > much because they are slow. The venders optimize their systems > for the common cases, and the common cases are Integers. > > It is possible to do the same tricks with Floats as are done > with Integers. With enough effort, I bet we could make Floats > as fast as Integers. I wish that would happen, because > Smalltalk would make a very good environment for scientific > computing if it were only faster at floating point arithmetic. Some information that may be of relevance to this topic and an earlier discussion about the limited speed gains from rewritng Smalltalk into C may be seen from the following benchmarks that I have started to collect. All of the statistics were gathered on the same machine (a 33Mhz 386PC with a math coprocessor) 2499 Savage Test 1000 times recursive fibonacci of 12 DOS MS C 5.1 490msec 1320msec ST/V-PM 530 2000 ST/V286 770 3630 ST/V-Windows 900 4290 ST-80 Windows 1400 1593 A couple of additional facts; ST-80 is 32 bit, while all of the other implementations are still 16 bit. the 2499 Savage test is 1 to: 2499 by: 1 do: [:a| a:= (a*a) sqrt ln exp arcTan tan + 1] The intersting analyses/corroborations of previous net statements in these numbers are: Floating point can be handled almost as efficiently with Smalltalk as with C. Smalltalk is not much slower than C, which is already an accepted language for many numerically intensive applications and hence should make an excellent environment for simulations.