Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!mips!hal!mark From: mark@mips.COM (Mark G. Johnson) Newsgroups: comp.benchmarks Subject: Re: (Useless) X (Meaningless) {digits of PI} Message-ID: <45474@mips.mips.COM> Date: 1 Feb 91 23:42:39 GMT References: <45469@mips.mips.COM> Sender: news@mips.COM Reply-To: mark@mips.COM (Mark G. Johnson) Lines: 24 > Sun SPARCStation 1+ 9.5 real 9.5 user 0.0 sys > Sun SPARCStation 2 29.4 real 29.3 user 0.0 sys <*** huh? > MIPS Magnum workstation 3.0 real 2.8 user 0.0 sys > >Note the very anomalous result on SS-II; I tried the code on 3 different >machines and kept getting the same answer. Replication/refutation of >this result would be much appreciated. Many thanks to Earl Killian; this has been explained. It is a function of the way the mpy and div subroutines are linked. With command line options you can alter the linking. Unfortunately, the most straightforward way also gave the longest runtime :-(. The third trial below takes advantage of the fact that the C source code #include's math.h but doesn't actually use it. Compiler invocation: cc -O prog.c -lm 29.3 user seconds Compiler invocation: cc -Bstatic -O prog.c -lm 5.2 user seconds Compiler invocation: cc -O prog.c 5.5 user seconds -- -- Mark Johnson MIPS Computer Systems, 930 E. Arques M/S 2-02, Sunnyvale, CA 94086 (408) 524-8308 mark@mips.com {or ...!decwrl!mips!mark}