Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cornell!uw-beaver!rice!sun-spots-request From: felix!arcturus!dav@hplabs.hp.com (David L. Markowitz) Newsgroups: comp.sys.sun Subject: Re: libm for 68881 and Sun fpa is incredibly slow Keywords: Software Message-ID: <4423@arcturus> Date: 6 May 89 14:37:31 GMT References: <8903222320.AA01458@bayes.arc.nasa.gov> Sender: usenet@rice.edu Organization: Rockwell International, Anaheim, CA Lines: 33 Approved: Sun-Spots@rice.edu Original-Date: 21 Apr 89 18:46:30 GMT X-Sun-Spots-Digest: Volume 7, Issue 272, message 11 of 19 self@bayes.arc.nasa.gov (Matthew Self) writes: > John Schultz compiled the following timings for Sun's math libraries using > GCC and CC with various options: > > > My results, running on Sun 3/60, Sun OS 3.5, GNU CC 1.32 built using > > default switches were > > [gcc timings deleted] > > cc -lm === 159.4 real 146.7 user 0.6 sys > > cc -O -lm === 155.4 real 146.2 user 0.4 sys > > cc -f68881 -lm === 6.6 real 4.6 user 0.1 sys Is this ^^^ a Typo? Maybe 6.4? > > cc /usr/lib/f68881.il === 9.9 real 6.7 user 0.1 sys > > cc -O /usr/lib/f68881.il === 6.5 real 6.4 user 0.0 sys [program deleted] > [discussion about GCC inline library reducing user time to 2.5s deleted] I would like to point out an error in the timing tests done above. The inline expansions only help in math library function calls - not in built-in floating point operations (like * and /). The -f68881 option does the opposite - it helps built-in math, but not math library function calls. Both are needed here. The optimal compiler command is therefore "cc -O -f68881 /usr/lib/f68881.il cos.c", which on my Sun 3/60 under SunOS 3.4 yields 3.7s of user time, which - while not as good as GCC with inlines - is still a lot better than the above matrix. Will this GCC inline stuff make it into a future GCC distribution? -- David L. Markowitz Rockwell International ...!sun!sunkist!arcturus!dav dav@arcturus.UUCP The above opinions are merely that, and only mine.