From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,183ebe04e93f0506 X-Google-Attributes: gid103376,public X-Google-Thread: 107079,183ebe04e93f0506 X-Google-Attributes: gid107079,public From: John.A.Limpert.1@gsfc.nasa.gov (John A. Limpert) Subject: Re: fixed point vs floating point Date: 1997/11/25 Message-ID: <347b5dee.107124246@news.gsfc.nasa.gov>#1/1 X-Deja-AN: 292674159 References: <65846t$4vq$1@gonzo.sun3.iaf.nl> <3478ac76.237781@SantaClara01.news.InterNex.Net> Reply-To: John.A.Limpert.1@gsfc.nasa.gov Distribution: inet Organization: NASA Goddard Space Flight Center -- Greenbelt, Maryland USA Newsgroups: comp.lang.ada,sci.math.num-analysis Date: 1997-11-25T00:00:00+00:00 List-Id: tmoran@bix.com (Tom Moran) wrote: >But "type degrees is delta 1.0/16 range 0.0 .. 360.0;" has only 5760 >possible values, and a table lookup with a table of 5760 entries is >often quite reasonable, and surely faster than converting to fp, >calculating a sin, and converting back. Not to mention if the >function is not just sin, but, say the 6th power of the cos (in a >Phong illumination calculation, say). Table lookup has been an important speed optimization for many years, but does it still work well on newer processors? My experience is that I don't get the speed improvements that I expect, probably due to the increasing penalty for cache misses on faster processors. The trend seems to be that branch-free pipelined code will run faster than table lookups. Have optimizing compilers kept up with the shifting tradeoffs?