Mail Archives: djgpp/1997/01/04/20:09:47
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 -