Search found 146 matches

by fabianVDW
Mon Apr 13, 2020 3:12 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: if statement and calculation faster than constant
Replies: 43
Views: 4708

Re: if statement and calculation faster than constant

Oh, I should have been clearer. That's exactly what I did. I didn't inline the function by hand. (Even though I don't really like "always", because it will also inline on debug builds I'd want to profile. Using only "inline" doesn't seem to make a difference with using nothing at all.) Oh ok, thank...
by fabianVDW
Mon Apr 13, 2020 2:26 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: if statement and calculation faster than constant
Replies: 43
Views: 4708

Re: if statement and calculation faster than constant

The function entries and exists are actually the most expensive parts; which I've hopefully resolved by inlining them. The compiler won't do it by itself because they're bigger than Rust's default inline threshold. I don't want to raise that threshold, because in that case it would inline more func...
by fabianVDW
Fri Apr 10, 2020 8:21 pm
Forum: Computer Chess Club: General Topics
Topic: New engine releases 2020
Replies: 598
Views: 165960

Re: New engine releases 2020

Hey all, in version 1.14 of Fabchess I introduced a dumb regression I had fixed before. If you have experienced crashes during testing FabChess with multiple threads, this patch will fix it. The strength on a single thread has not changed, so no need to update (unless you to plan to play with multip...
by fabianVDW
Fri Apr 10, 2020 3:20 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: if statement and calculation faster than constant
Replies: 43
Views: 4708

Re: if statement and calculation faster than constant

An xor is a hardware operation, and independent of programming language. It takes around 1 cycle. What you are really measuring is most likely what HGM describes in his post above. I can recommend this talk: https://www.youtube.com/watch?v=r-TLSBd ... e=youtu.be
by fabianVDW
Fri Apr 10, 2020 2:59 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: if statement and calculation faster than constant
Replies: 43
Views: 4708

Re: if statement and calculation faster than constant

For my feeling, I've now "proven" that Rust can be as fast as C, even in non-trivial projects like mini-benchmarks, but it does require a bit of special work. I have two arrays backed by a counter, in a struct, which implement the normal vector methods such as push, pop, clear, len, etc, just becau...
by fabianVDW
Fri Apr 10, 2020 11:51 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Looking for Magics, with ternary field types.
Replies: 10
Views: 1175

Re: Looking for Magics, with ternary field types.

Using 64-Bit Magics,I still couldn't get better than 8KB. I think either a) I am search through the search space very inefficiently or b) the problem is just a very hard one, with the way the information is packed. It's definitely a mixture of both, and it's very hard to find a good way to pack the ...
by fabianVDW
Wed Apr 08, 2020 12:17 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Looking for Magics, with ternary field types.
Replies: 10
Views: 1175

Re: Looking for Magics, with ternary field types.

I just found out, that when I say L3, I actually mean L1 cache, and that the table is already small enough to fit into L1, although I am obviously still interested in making it as small as possible.
by fabianVDW
Wed Apr 08, 2020 12:11 pm
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Looking for Magics, with ternary field types.
Replies: 10
Views: 1175

Re: Looking for Magics, with ternary field types.

Well, it is hard to say anything sensible about this without knowing more details. E.g. how are the relevant bits distributed over their masks, and how are the 656 neighborhood compositions grouped into 64. Okay, I will go into more detail. The game is called Hive, if you maybe know it. The grid is...
by fabianVDW
Wed Apr 08, 2020 11:21 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Looking for Magics, with ternary field types.
Replies: 10
Views: 1175

Re: Looking for Magics, with ternary field types.

Since your boards seem to need only 32 bits, you could make the occupied and obstacle board sub-fields of a uint64, and use a uint64 multiplier to effectively create the sum of the products of the lower 32-bits of the multiplier with one, and the upper 32-bit with the other, in the upper half of th...
by fabianVDW
Wed Apr 08, 2020 9:44 am
Forum: Computer Chess Club: Programming and Technical Discussions
Topic: Looking for Magics, with ternary field types.
Replies: 10
Views: 1175

Re: Looking for Magics, with ternary field types.

I don't get what you are trying to do. What else can you be blocked by than by a piece? Are you considering boards with holes in them? And would the holes be any different in blocking probabilities than having an own piece there? Thats right, you can be blocked by something else than a piece, there...