Author: Rafael Andrist
Date: 06:20:54 11/16/00
Go up one level in this thread
On November 16, 2000 at 05:38:02, martin fierz wrote:
>hi,
>
>i recently moved from borland C 5.5 to visual C 6.0 professional which resulted
>in a 10% speed increase in my checkers program - this helps answer a question i
>asked recently about 'best compilers'.
>
>i have another question about speed: i'm using large arrays for different
>things, hash-xoring, bit-counting, some arrays in the evaluation etc. i noticed
>that the final speed of my program depends on how i declare them - but the
>behavior seems rather erratic. does anybody know if there should be a difference
>between declaring globals like this:
>
>int large_array[BIG_NUMBER];
>
>or
>
>int *large_array;
>
>followed by a malloc in the initialization?
>
>and when i'm using an array in the evaluation function, should there be a
>difference between declaring the array as either a global array, or
>alternatively declaring it in the function as static int array={1,2,3,...}?
>
If you declare the array local, you have more stack traffic und you need more
time. So I would recommend to use global arrays.
>thanks for your advice
> martin
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.