Re: [Algorithms] Fast Floating-Point compares?
Brought to you by:
vexxed72
|
From: Jonathan B. <jo...@nu...> - 2003-08-16 06:06:01
|
Also it's worth pointing out that if what you're really writing is something like Max() or Min(), or "use index a if x < y, else use index b", you can do all that without branching pretty easily, if branching throws you into a tizzy. (and without using newer assembly instructions like cmov). So if you want the Max() of two floating-point numbers each of which you know is non-negative, it all boils down to a small number of integer math instructions only. ----- Original Message ----- From: "Conor Stokes" <cs...@tp...> To: <gda...@li...> Sent: Friday, August 15, 2003 11:31 PM Subject: Re: [Algorithms] Fast Floating-Point compares? > > Compares are always slow because filling branch delay slots is not > > always possible and aggressive prediction and speculative execution are > > very hard problems. You'd be better off spending your time figuring out > > a better algorithm (gee, that's what this list is for!) and doing fewer > > compares in total. > > Compares aren't always slow (especially on the x86) - branches give them a > bad name. > > Conor Stokes > > > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites including > Data Reports, E-commerce, Portals, and Forums are available now. > Download today and enter to win an XBOX or Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > https://lists.sourceforge.net/lists/listinfo/gdalgorithms-list > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=6188 |