Search found 825 matches

by wgarvin
Mon Jan 11, 2016 2:12 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: NUMA 101
Replies: 26
Views: 4740

Re: NUMA 101

Thanks for your very interesting post, it is very clear and complete. A whole unknown world has been opened to me! There is a lot to think about. For example, when you use magics, you can end up with ALL of the magic lookup tables on a single node? Good, bad or indifferent? I haven't addressed this...
by wgarvin
Thu Jan 07, 2016 7:55 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: NUMA 101
Replies: 26
Views: 4740

Re: NUMA 101

If someone wants to try and handle NUMA properly on Windows, the MSDN page about NUMA Support is probably a good starting point. [Sorry, MS uses dumb characters in their URLs and I couldn't figure out how to get bbcode to handle this link correctly!] https://msdn.microsoft.com/en-us/library/windows/...
by wgarvin
Wed Jan 06, 2016 10:53 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Comparison of bitboard attack-getter variants
Replies: 57
Views: 8246

Re: Comparison of bitboard attack-getter variants

I wonder if BMI2 - PEXT is any faster than plain magic, on the chips that support it? (My guess would be about the same) Yes, a comparison of plain magics vs. fancy magics vs. fancy PEXT BB in a concrete chess program would be interesting. My guess in Sven's Attack64 program (no hashtables) ... 1. ...
by wgarvin
Wed Jan 06, 2016 2:32 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Comparison of bitboard attack-getter variants
Replies: 57
Views: 8246

Re: Comparison of bitboard attack-getter variants

I wonder if BMI2 - PEXT is any faster than plain magic, on the chips that support it?

(My guess would be about the same)
by wgarvin
Sat Sep 19, 2015 5:36 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: atomic TT
Replies: 56
Views: 6815

Re: atomic TT

I don't understand how the C++ standard allows the compiler to break lock-less hashing xor trick. Anyone can explain (in lay man words) ? See here . Crafty's HashProbe() contains: for (entry = 0; entry < 4; entry++, htable++) { word1 = htable->word1; word2 = htable->word2 ^ word1; if (...
by wgarvin
Mon Aug 17, 2015 11:09 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: most similar hashes of two positions
Replies: 47
Views: 7287

Re: most similar hashes of two positions

I guess you could use a set of 64 keys, one per square, and rotate them by 4*P bits, for a piece type P in [1..12]. The table of keys would then be 512 bytes. Not as tiny as some of the other "rotated key" ideas, but still pretty small, the entire table would fit in 8 cache lines. It would work well...
by wgarvin
Fri Aug 14, 2015 12:27 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: most similar hashes of two positions
Replies: 47
Views: 7287

Re: most similar hashes of two positions

Of course the L1 cachelines are 64 bytes on these architectures, not 32 bytes, but every 64-byte boundary is also a 32-byte boundary. You might be able to overlap the keys every 8 bits instead of every 16 bits, but its pretty difficult to get a table smaller than 2 KB with no 64-byte boundary crossi...
by wgarvin
Fri Aug 14, 2015 12:22 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: memcpy() bug
Replies: 10
Views: 1382

Re: memcpy() bug

A trick I find useful, is to look at each type and expression one at a time, and mechanically translate the types into English. The important thing is to make sure to translate what the code actually says (instead of just saying what you intended it to mean when you wrote it) position leaf; memcpy( ...
by wgarvin
Thu Aug 13, 2015 11:40 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: most similar hashes of two positions
Replies: 47
Views: 7287

Re: most similar hashes of two positions

Only issue I would see is alignment. I might give it a try to see what it does to speed. Indeed, and on some architectures it would not be allowed at all for that reason. But on modern Intel-architectures I discovered that there is no penalty at all, unless the word straddles a cache-line boundary....
by wgarvin
Thu Aug 13, 2015 11:21 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: memcpy() bug
Replies: 10
Views: 1382

Re: memcpy() bug

bd is a pointer, its size is 4 or 8 bytes.

You probably meant to copy sizeof(*bd) bytes--or sizeof(Position).

(Edit: also you were copying from "address of the pointer bd" rather than "address pointed to by bd")

Code: Select all

memcpy&#40;&pline->leaf,bd,sizeof&#40;*bd&#41;);