Mail Archives: djgpp/1997/08/04/05:35:23

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$>
References: <33DB24DC DOT 156 AT effect DOT net DOT au>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

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,

- Raw text -

  webmaster     delorie software   privacy  
  Copyright 2019   by DJ Delorie     Updated Jul 2019