crafty eval cache

Discussion of chess software programming and technical issues.

Moderator: Ras

bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: crafty eval cache

Post by bob »

Cardoso wrote:Hi,
I noticed crafty 25 has an eval hash table.
It uses 32 bits from the upper part of the hashkey plus 16 bits from the hash size (65536), this is 48 bits total, do you think this is enough?
I understand it is nice to have 64 bits for the eval hash entries (32 for key + 32 for score), but 48 bits for the key seems a bit risky.

Alvaro
BTW it is not clear this will remain. It adds a measurable bottleneck in SMP implementations, since this is done at the tips, which makes it high volume, and that's not so good for cache coherency with significant numbers of cores, as the cost climbs significantly as cores are added.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: crafty eval cache

Post by Evert »

bob wrote: BTW it is not clear this will remain. It adds a measurable bottleneck in SMP implementations, since this is done at the tips, which makes it high volume, and that's not so good for cache coherency with significant numbers of cores, as the cost climbs significantly as cores are added.
Interesting. That wouldn't have occurred to me.
Do you share the evaluation cache with different threads or do you have a per-thread cache?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: crafty eval cache

Post by bob »

Evert wrote:
bob wrote: BTW it is not clear this will remain. It adds a measurable bottleneck in SMP implementations, since this is done at the tips, which makes it high volume, and that's not so good for cache coherency with significant numbers of cores, as the cost climbs significantly as cores are added.
Interesting. That wouldn't have occurred to me.
Do you share the evaluation cache with different threads or do you have a per-thread cache?
It is currently shared...