Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: int vs short int

Author: Anthony Cozzie

Date: 05:26:08 12/03/03

Go up one level in this thread


On December 02, 2003 at 21:39:59, Federico Corigliano wrote:

>Hi to all
>
>I'm rewriting some parts of my chess engine, and in one of my data structures I
>can save space converting some fields from int to short int.
>As that fields are used a lot in the chess engine, I want to know if there are
>difference in speed between the two variables, because, I don't want to optimize
>the engine making it slower :-D
>
>Federico

On athlon, loading a 32 bit integer takes 3 cycles, while loading a 16/8 bit int
takes 4.  However, the 16/8 bit integers are easier to store in the cache.  So
it is a tossup :)  The only advice I can give is try it and see.

anthony



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.