Author: Richard Pijl
Date: 03:14:04 07/17/03
Go up one level in this thread
On July 17, 2003 at 05:58:39, Gerd Isenberg wrote: >On July 17, 2003 at 05:06:16, Uri Blass wrote: > >>Note that the name of the arrays that I have is different but I replaced the >>names to make it easy to understand the problem. >> >>I have an array A[64][8] >> >>I want to replace it by 8 arrays A0[64],A1[64],...A7[64] when A[i][j]=Aj[i] > >Hi Uri, > >I would suggest A[8][64] for your purpose. > >Then you still may index the arrays with A[j][sq] and you get your suggested >single 64 element arrays: A0[sq], A1[sq] with A[0][sq], A[1][sq] ... > >Gerd Of course! Let the compiler do the optimizing. I guess most compilers will recognize this? Richard. > >> >>What is the best way to do it? >> >>I already added the arrays A0...A7 except the fact that I have different names. >>Today movei update both A0...A7 and A. >> >>I do not want to update A but to use Aj[i] that always has the same value as >>A[i][j]. >> >>There are cases when I call directly A3[square] and it should be faster then >>calling A[square][3] but there cases when I call Aj[square] when j is not the >>same every time. >> >>I can do it by switch command but the question is if this is the right way to go >>or if there is a faster way. >> >>I thought that it may be possible to have some union when A0,A1,....A7 means the >>same as A but I do not see exactly how to do it. >> >>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.