Perft comparison, part 2: start position, Perft 9, on a new PC
This follows my earlier comparison on an old PC, Ryzen 7 1700, Perft 8, posted on the first page.
After some years of postponing, I finally bought a new PC. One of my first tasks was to rerun that comparison on the new PC. Several programs have been updated since then. This time, every program ran one depth deeper, Perft 9, including the slow single-thread ones, perft_gpu_2026, Xiphos was added.
Machine
AMD Ryzen 9 9950X3D (16 cores / 32 threads, Zen 5, AVX-512, fast PEXT), 32 GB DDR5-6000 CL38 (EXPO), NVIDIA RTX 5070 12 GB, Windows 11. The PC was idle during the runs.
Results: start position, perft 9 = 2,439,530,234,167 (every program gave the correct count)
Time = the time the program itself reports for the perft calculation (start-up, loading and hash allocation not included). Each program ran in its best configuration: all 32 threads for multi-threaded programs, the best hash size for programs with a hash table, and the fastest build (my own native build or the author's exe, whichever was faster).
Code: Select all
# Program Threads Hash Time Speed
1 perft_gpu_2026 GPU 8 GB 0.443 s 5,507 Gnps
2 chessbit (boardstate_tt) 32 8 GB 0.972 s 2,510 Gnps
3 MPerft 5.3 32 8 GB 2.934 s 831 Gnps
4 perft_cpu_2026 32 8 GB 3.864 s 631 Gnps
5 hqperft 1.1 1 8 GB 111.0 s 22 Gnps
6 qperft 1 8 GB 160.9 s 15 Gnps
7 Juddperft 32 8 GB 210.6 s 12 Gnps
8 chessbit (boardstate_fastest) * 1 - 800.8 s 3.0 Gnps
9 Gigantua * 1 - 1059.7 s 2.3 Gnps
10 Xiphos 0.6 * 1 - 3113.7 s 0.78 Gnps
11 BBPerft * 1 - 4792.4 s 0.51 Gnps
12 Stockfish 19 * 1 - 6641.6 s 0.37 Gnps
Other builds of the same programs:
- MPerft 5.3 built on my PC (clang 23, PGO, -march=native): 3.248 s. The author's own v3 exe was faster.
- MPerft 5.3 in plain bulk-counting mode (-b, the same counting method as the others; its default -n mode counts the last ply differently): 4.448 s.
- perft_cpu_2026 built with MSVC (the author's CMake build): 4.564 s.
- hqperft and qperft with a 1 GB hash: 113.2 s and 200.4 s.
- Xiphos built on my PC (GCC 16, -march=native, PGO) was about 12% slower than the author's bmi2 exe, so the author's exe was used.
The programs and how to run them at their best
FEN = rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
1. perft_gpu_2026 (Ankan Banerjee, github ankan-ban/perft_gpu_2026, 2026-07-29)
Built with nvcc 13.4,
-O3 -arch=sm_120.
Code: Select all
perft_gpu.exe "<FEN>" 9 -dtt 8192 -htt 8192
Always set
-dtt (GPU memory) and
-htt (host memory) yourself. The defaults take 95% of free VRAM and 90% of RAM.
2. chessbit, boardstate_tt branch (Thomas Huijbregts, github thuijbregts/chessbit, 2026-08-01)
Built with clang++ 23,
-O3 -march=native -std=c++23, PGO. It is interactive; send these lines:
Code: Select all
setfen <FEN>
tt on
perft -d 9 -t 32 -h 8192
exit
- Always give -h <MB>. Without it, the hash takes 90% of free RAM.
- perft -d is the multi-threaded mode; plain perft <d> uses one thread.
3. MPerft 5.3 (Richard Delorme, GitHub abulmo/MPerft, 2026-06-26)
The official
mperft-5.3-x86-64-v3.exe was the fastest MPerft build.
Code: Select all
mperft -f "<FEN>" -d 9 -n -t 32 -h 8192 -q
-n is the default fast mode, which does null-move counting at the last-but-one ply.
-b gives plain bulk counting.
4. perft_cpu_2026 (Ankan Banerjee, github ankan-ban/perft_cpu_2026, 2026-08-23)
Built with clang++ 23,
-O3 -flto -march=native, no PGO. The author's README says PGO slows the hash runs by about 7%.
Code: Select all
perft_cpu.exe "<FEN>" 9 -htt 8192 -mt 32
Always set
-htt; the default is 90% of RAM.
-nott turns the hash off.
5. hqperft 1.1 (Richard Delorme, github abulmo/hqperft, 2024-03-24)
Built with gcc 16,
-Ofast -flto -march=native, PGO.
The hash size is given in bits: 2^29 entries x 16 bytes = 8 GB.
6. qperft (H.G. Muller, perft.c from his website)
Built with gcc 16,
-O3 -march=native -flto, PGO, as a 64-bit program. That needed a one-line patch: the hash alignment cast
(int)Hash truncated pointers.
The hash size is given in bits (H29 = 8 GB). It writes a log file, log.txt, in the working folder.
7. Juddperft (Judd Niemann, github jniemann66/juddperft, 2026-01-11)
Built with g++ 16,
-O3 -mcx16 -march=native -flto, PGO. It is interactive:
Code: Select all
memory 8589934592
cores 32
setboard <FEN>
perftfast 9
quit
- The memory size is in bytes, and "1G" means 10^9 bytes.
- It allocates about 5 GB at start-up before memory resizes the table.
- It writes a log file, perft.txt, in the working folder.
8. chessbit, boardstate_fastest branch (Thomas Huijbregts, 2026-07-18)
Built like boardstate_tt. Interactive:
setfen <FEN>,
perft 9,
exit.
- Problem: it cannot go deeper than perft 7: the depth is a template parameter, and the switch in Cui::generateMoves() has the cases for depths 8-18 commented out, so "perft 8" prints "Nodes: 0". There is no command-line option for it. I uncommented the cases for depths 8 and 9 only; each extra case makes the already long compile longer.
- Bug report for the author: this branch's perft -d (divide) mode miscounts on positions with castling, even with -t 1. Kiwipete perft 5 gives 193,945,275 instead of 193,690,690. Its plain perft <d> is correct, and so is boardstate_tt in every mode.
9. Gigantua (Daniel Infuehr, github Gigantua/Gigantua, 2021-11-15)
Built with clang++ 23,
-O3 -flto -march=native -std=c++20, PGO. This build needed about 40% less time than the official 1.6 exe (perft 8: 37.4 s vs 61.0 s).
It computes perft 1 to 9 in turn and waits for a key at the end. The time shown is its perft 9 line.
10. Xiphos 0.6 (Milos Tatarevic, github milostatarevic/xiphos)
The author's
xiphos-0.6-w64-bmi2.exe. It is a UCI engine with a perft command:
To build it with gcc 15 or newer, add
-std=gnu17: the C23 default rejects its old-style declarations.
11. BBPerft (Manik Charan, github Mk-Chan/BBPerft, 2020-08-29)
Built with g++ 16,
-O3 -march=native -flto, PGO.
12. Stockfish 19 (Stockfish team, tag sf_19)
make profile-build ARCH=x86-64-avx512icl COMP=mingw, static.
go perft is single-threaded, without a hash table, and prints no time. I added a timer around the perft call in
UCIEngine::perft() (uci.cpp; it prints "Time: <ms> ms" after "Nodes searched"), so the start-up and the NNUE loading are not counted. Nothing else was changed.