leanchess wrote: ↑Fri Apr 10, 2020 5:11 pm
Are you using clang?
No. Eh... yes. Wait. I'll explain
For C/C++, there are many compilers: clang/clang++, gcc/g++, msvc/++, and many, many more.
As far as I know, there's only one Rust compiler at the moment: rustc.
Both clang and rustc compile to what is known "LLVM intermediate code", and from there, the LLVM backend takes over. This results in one or more object files, which are then linked into an executable. On Windows, this can be done with GNU's ld.exe (under MinGW/MSYS2), or Microsoft's link.exe, if you have the MSVC toolchain selected.
So yes, I'm using 'clang', in the sense that both Rust (rustc) and C (clang) compile to LLVM.
I just noticed a mention of a Zobrist key in your output. Does that mean that it's 90 seconds WITH hashing?
Yes. My perft 7 runtime is now down to 86.xx seconds on my system (i7-6700K), and this is:
- Without hash/transposition table
- Without bulk counting of leaf nodes (full make/unmake)
- Without special "in check" move generators and such
- WITH full chess implementation (promotions, castling)
- WITH incremental Zobrist hash updates
- WITH incremental piece list updates (location of each piece on the board)
- WITH incremental material balance update (material count for each side)
This is the same as it is in Weiss (edit: without move ordering). They both use magic bitboards, and their make/unmake functions are almost the same. The only difference is that Weiss (by Terje) is written in C, and Rustic (by me) is written in Rust. On this system, the speed of Weiss and Rustic is now within two seconds of one another (edit: with the advantage going to Rustic; probably because it doesn't yet do move ordering.)
(Weiss was based on an older tutorial engine, called VICE and later converted from a piece/square iterator to a bitboard engine; Rustic is built from scratch, using bitboards from the start, but I did follow VICE's tutorials. Therefore Rustic is inevitably a bit Weiss as well. However, Weiss is in development much longer, so it is already quite strong. Rustic is, as of now, only a move generator / perft engine. It will get there, in time.)