Author: Sune Fischer
Date: 15:51:11 01/05/04
Go up one level in this thread
On January 05, 2004 at 18:30:59, Uri Blass wrote: >Remmeber that the check is only going to be done at most 4 times in common >cases(I think that in most cases you have even not more than 2 captures in the >same square for example 1.e4 e5 2.Nf3 Nc6 3.Nxe5 Nxe5 no more captures). Ok, but even 2 checks is 2 more than you need. :) >I remember from experience with my program that allocating memory for varaibles >in functions is expensive and in the early days of movei I got a significant >speed improvement by having global arrays instead of having local arrays even in >cases that I did not need to use the global array out of the function. I don't blieve there should be any overhead unless you initialize them. From what I understand the processor just allocates a certain stack space, the size of the stack should not matter. Though now that you mention it things often seem to be initialized to zero regardless, so maybe there's something I don't understand here. But in any case you can make it static, right? That would keep it alive until you need it again, sort of like global only within the function's scope. -S. >Uri
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.