Regarding array size and speed...

Discussion of chess software programming and technical issues.

Moderator: Ras

voyagerOne
Posts: 154
Joined: Tue May 17, 2011 8:12 pm

Re: Regarding array size and speed...

Post by voyagerOne »

Hi Marco,

Well I do have a working solid engine...
micron
Posts: 155
Joined: Mon Feb 15, 2010 9:33 am
Location: New Zealand

Re: Regarding array size and speed...

Post by micron »

voyagerOne wrote: Byte=3065 ms
int=5500 ms
long=7422 ms
Systematically varying the array size:

Code: Select all

  32 KiB     9.8 ns
  64 KiB     9.8 ns
 128 KiB     9.8 ns
 256 KiB     9.8 ns
 512 KiB     9.9 ns
   1 MiB    10.0 ns
   2 MiB    10.0 ns
   4 MiB    10.1 ns
   8 MiB    10.8 ns
  16 MiB    19.4 ns
  32 MiB    21.6 ns
  64 MiB    23.3 ns
 128 MiB    24.9 ns
 256 MiB    26.0 ns
 512 MiB    26.6 ns
   1 GiB    29.8 ns
Note the abrupt increase in random access time from 8 to 16 MiB, as the array no longer fits into my machine's level 3 cache.

Robert P.