Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Floating point VS Integer Math.

Author: Dan Newman

Date: 19:14:11 05/14/98

Go up one level in this thread


On May 14, 1998 at 19:15:24, Bruce Moreland wrote:

>There is probably some guy out there working furiously on a program, and
>his big angle is that he does floating point math in just the right
>spots, or so he thinks.
>
>On all the micros that I know of, you should use integers if you can.
>Most chess programs are extreme examples of optimization, so they'll
>tend to not use floating point at all.
>
>If there is a processor where floating point is faster, or some
>combination of floating point and integer is fastest, there is some
>lunatic out there right now writing floating point chess program code in
>assembly language.
>
>And if the assembler doesn't do exactly what he wants, he'll input the
>op-codes by hand into a hex editor.
>
>bruce

I once tried using FP math in one of my earlier
chess programs--but for the score arithmetic only.
My idea was this: that the Pentium processor could
do floating point arithmetic in parallel with the
integer, and so I might get increased performance
this way.

IIRC, the resultant code was a bit slower--but not
by much.  I don't really know why it didn't work.
Perhaps I should blame the code generated by the
compiler.  Or perhaps the floating point was so
much slower that it dominated...

(Maybe I should try it again on the P6--though a
32-bit floater is a bit big for storing in a hash
table.)

-Dan.



This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.