Author: Uri Blass
Date: 19:30:59 07/17/03
Go up one level in this thread
On July 17, 2003 at 18:33:11, Gerd Isenberg wrote: >>I understand now that i=A0[j] is faster than i=A[0][j] > >No Uri, if A0 and A are static or global int arrays it should be the same. >Because the address A0 is known by the compiler, same for A[0]. >A constant left most index doesn't matter. Thanks. I hope that I understand It is a bad idea to use pointers and it is better if I get rif of the new arrays and replace the 8 arrays bu 8 defines. What confused me was that you wrote in your post: #define A0 A[0] and maybe later #undef A0 or even in other context #define A0 A[1] I do not see a reason to use undef or #define A0 A[1] I plan now to use: #define A0 A[0] #define A1 A[1] #define A2 A[2] #define A3 A[3] #define A4 A[4] #define A5 A[5] #define A6 A[6] #define A7 A[7] and get rid of the old arrays A0,...A7 without the need to change the source code and if it has similiar speed then later I plan to save time by deleting every case that I have A[i][j]= because I do not need it when I already have Ai[j]=... and Ai[j] get the same value. 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.