This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fixed point math?


>>AFAIK, x86 processors since the Pentium have had very good and fast
>>floating-point support - this is what made John Carmack switch from
>>using fixed-point for DOOM to using floating-point for Quake and
>>subsequent games from iD Software.
> 
> 
> Wow, I had no idea that this was the case.  My application

See Chris Hecker's article on this:

    http://www.d6.com/users/checker/pdfs/gdmfp.pdf

And also Chapter 63 of Michael Abrash's "Graphics
Programming Black Book" (sadly out of print, IIRC):

    http://www.byte.com/abrash/


> Do you know where I can find a comparison of the time to multiply two
> 32-bit floats vs two 32-bit ints on x86?

Chris Hecker's article linked above gives this info
(in cycles):

Integer Multiply: 12-42 (486), 10 (Pentium)
Integer Divide: 43 (486), 46 (Pentium)

Float Multiply: 11 (486), 3 (Pentium)
Float Divide: 62-35 (486), 33-19 (Pentium)

(The two numbers are for single and double precision
respectively.)


> Interesting.  Although if I really want to go parallel, I should be
> using MMX (which is strictly fixedpoint).

The SSE instruction set extension to MMX added support
for floating-point operations as well:

    http://www.tommesani.com/SSE.html

Ranjit.

-- 
Ranjit Mathew          Email: rmathew AT hotmail DOT com

Bangalore, INDIA.      Web: http://ranjitmathew.tripod.com/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]