libm for 68881 and Sun fpa is incredibly slow
David L. Markowitz
felix!arcturus!dav at hplabs.hp.com
Sun May 7 00:37:31 AEST 1989
self at 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 at arcturus.UUCP
The above opinions are merely that, and only mine.
More information about the Comp.sys.sun
mailing list