Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!bbn!gatech!psuvax1!schwartz@shire.cs.psu.edu From: schwartz@shire.cs.psu.edu (Scott Schwartz) Newsgroups: comp.arch Subject: Re: Questions on SparcStation 1 performance Message-ID: <4566@psuvax1.cs.psu.edu> Date: 10 May 89 04:34:53 GMT References: <6008@brunix.UUCP> Sender: news@psuvax1.cs.psu.edu Reply-To: schwartz@shire.cs.psu.edu (Scott Schwartz) Organization: Pennsylvania State University, Computer Science Lines: 26 In-reply-to: jps@cs.brown.edu (John Shewchuk) In article <6008@brunix.UUCP>, jps@cs (John Shewchuk) writes: > x = (a * y)/b; [100,000 iterations] >To my surprise I found that the floating point version returned >quickly - it used about 1.6 seconds of user time - while the integer >version took much longer- about 43 seconds. Could you give us some more information? I just tried the following on a Sun4/260, sans -O; it took 0.4 user, 0.0 sys. main() { int x = 1, y = 9, a = 3, b = 4; int i = 100000; &x; &y; &a; &b; while (--i) { x = (a * y)/b; &x; } } Hey, the Sun4/110 does fp via kernel emulation: maybe the SparcStations do integer that way! :-) :-) -- Scott Schwartz