Author: Russell Reagan
Date: 18:58:14 12/02/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 I would use a typedef to make it easy to switch back and forth between the two, then you can test it out and see which is faster for yourself. You might also try signed vs. unsigned. A typedef makes that all very easy. Something like: typedef int Square; Then later change it to: typedef short int Square; Or: typedef unsigned long Square; // Or whatever you'd like
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.