www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/04/20:09:47

From: Arash <ei39594 AT ios DOT chalmers DOT se>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Fixed Point (Optimization)
Date: Sat, 04 Jan 1997 19:49:13 +0100
Organization: Chalmers University of Technology
Lines: 34
Message-ID: <32CEA629.1650@ios.chalmers.se>
References: <32cd6b2c DOT 4726585 AT nntp DOT southeast DOT net>
NNTP-Posting-Host: sv320110.ios.chalmers.se
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Murray Stokely wrote:
> 
>      Is Fixed-Point math still a neccesity for today's computers with
> all their built it FPU's, etc?  How much faster can it be?  Anyway,
> this is the same code procedure from our long thread on optimization;
> I've recently come back to it, because I still see room for
> improvement.  What can be done to it.  Fixed point?  Lookup tables?....
> Murray Stokely ( murray AT southeast DOT net )
> http://www.cdrom.com/pub/artpacks

Run Quake on a 486 and you will get you answer (Quake uses some fpu instructions)


BTW, some friend of mine suggests that you should use Tyler-polynoms insted, but don't ask me what it is....
I would NOT use sqrt() at all, you can't use lookup-tables for sqrt() but you can do a lot of other stuffs with it.

and i think that this is the part that slows down most (an fpu instruction inside a loop???) :
....
 } else {
       z=round(sqrt(r2-x2-y2));
....


Please let me know if i'm wrong!


-- Arash
   _____                            |\/\/\/|     
  /     \      _____________        |      |      _______________
\/\/     |    | diz sux...  \       |      |     |  way too much |
 |  (c)(c)    | ..he he cool|       | (o)(o)     |  MTV dad!     |
 C   .---_)   |  __________/        S      _)    \   ____________|
  | |.___|   /  /                   | ,___|    __/  /
  |  \__/   <__/                    |    /    <____/

- Raw text -


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