This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: fixed point math?
- From: Adam Megacz <gcj at lists dot megacz dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java at gcc dot gnu dot org
- Date: 26 Jun 2003 23:27:49 -0700
- Subject: Re: fixed point math?
- Organization: Myself
- References: <m17k78cra9.fsf@nowhere.com> <3EFBDEAF.5040805@hotmail.com>
Ranjit Mathew <rmathew@hotmail.com> writes:
> Is it for speed?
yes.
> 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
http://lists.xwt.org/pipermail/announce/2003-June/000037.html
really, genuinely has absolutely no need for floating point precision,
but spends a lot of time multiplying matrices in tight loops. So even
if fixedpoint is only two times faster, it's still a big win for me.
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?
<digs around a bit>
Hrm, perhaps it's this:
...exploits the fact that the P5 architecture allows for scheduling
integer and floating operations in parallel...
Interesting. Although if I really want to go parallel, I should be
using MMX (which is strictly fixedpoint).
- a