Author: Gerd Isenberg
Date: 03:36:54 07/07/03
Go up one level in this thread
On July 07, 2003 at 06:06:08, Ricardo Gibert wrote: <snip> >It is better to do the 8 if statement approach first, because it makes it >simpler and easier to debug everything. After everything is debugged and >working, use a profiler to determine whether optimizing would really payoff. >Most often the conclusion is that it would not and a lot of extra work will be >saved. Also, the benefits of simpler clearer code is not to be underestimated. Hi Ricardo, agreed - this function must really be a optimization hotspot. Anyway, i would suppress a switch with an additional memory lookup like Uri suggested: switch ( i=smallestpower[number] ) because the "higher" cases need less affort than the "lower" ones. But as Reinhard Regards, Gerd
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.