Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!husc6!rice!sun-spots-request From: steinmetz!dawn!stpeters@uunet.uu.net Newsgroups: comp.sys.sun Subject: Re: Fortran 300 times faster than C for computing cosine Keywords: Software Message-ID: <8904192130.AA08387@dawn.steinmetz.Ge.Com> Date: 6 May 89 00:37:34 GMT Sender: usenet@rice.edu Organization: GE Corporate R&D, Schenectady, NY Lines: 26 Approved: Sun-Spots@rice.edu Original-Date: Wed, 19 Apr 89 17:30:00 EDT X-Sun-Spots-Digest: Volume 7, Issue 269, message 2 of 23 In article <8903221250.AA03853@trantor.harris-atd.com> you write: >Does anyone know of an optimizer which will convert calls to the standard >math routines to their 68881 instruction counterparts? In effect, yes. The mechanism Sun uses is to have in-line code (.il) templates that cause the compiler to generate in-line code in place of the math library calls. If you're running SunOS 3.X: cc -c -f68881 program.c /usr/lib/f68881.il cc -o program -f68881 program.o -lm If you're running 4.0, it's even easier: cc -o program program.c /usr/lib/f68881/libm.il Substitute soft, switch, or fpa for f68881 as appropriate. These can make differences of HUGE factors in how fast floating point programs run. That floating point manual really is worth reading :-) Dick St.Peters GE Corporate R&D, Schenectady, NY stpeters@dawn.crd.ge.com uunet!steinmetz!dawn!stpeters