Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Is there an advantage for using unsigned 64 bit integers for hash?

Author: Jaime Benito de Valle Ruiz

Date: 07:56:07 09/11/03

Go up one level in this thread


On September 11, 2003 at 08:03:13, Uri Blass wrote:

>My natural choice is not to use unsigned for varaibles if there is no special
>reasons.
>
>I decided to define bitboard as unsigned but except it my varaibles are usually
>not unsigned including the hash key for the position.
>
>My question is if there is an advantage for using unsigned varaibles.

If you use any 64 bit division in your program, the unsigned one is faster than
the signed one (5 cycles, or so I remember).
For example, if you use the modulus (%) to calculate the hash address, it should
be faster. I don't think you'll get a very significative performance out of this
optimization, but it's recommended both by AMD & INTEL and it won't hurt anyway.
;)

Regards,

  Jaime



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.