From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) Newsgroups: comp.os.msdos.djgpp Subject: Re: PLEASE! Help optimize my floorcaster.... Date: 1 Aug 1997 05:15:47 GMT Organization: The National Capital FreeNet Lines: 20 Message-ID: <5rrre3$5sj@freenet-news.carleton.ca> References: <33DB24DC DOT 156 AT effect DOT net DOT au> Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire) NNTP-Posting-Host: freenet2.carleton.ca To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Floats on regular Pentium and and Pentium Pro are as fast as fixeds. Float to int conversion is super slow. Fixed to int conversion is fast. (It's a single ML instruction, an octuple left shift or something of that sort. Look in allegro.h where it is inlined.) If you convert a lot, use purely floats even for "ints" unless you need to count on nonfractional values (e.g. array subscripts, pixels), or used fixeds. Also, Pentium Pro MMX and regular Cyrix 686 stink at floating point math. (Intel must have dyked the floating accelerator stuff out to fit MMX in, and Cyrix just plain stinks anyways. Cyrix MMX still stinks at floating point, but it beats Intel MMX!) -- .*. Where feelings are concerned, answers are rarely simple [GeneDeWeese] -() < When I go to the theater, I always go straight to the "bag and mix" `*' bulk candy section...because variety is the spice of life... [me] Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh