Benchmarks

Starting from version 0.2.0 of OrbisChessEngine this page shows benchmark results for perft for various depths. Can be used to compare performance with older versions.

Benchmark Results for Perft

All benchmarks below are using a single thread. Perft uses the Board stuct from OrbisChessEngine, which means it computes zobrist hash, and evaluation score at each node. Thus, it mimics the search process more closely than a pure move generator perft.

using OrbisChessEngine
using BenchmarkTools
b = Board()
perft(b, 5) # warm up
@benchmark perft($b, 5)
BenchmarkTools.Trial: 11 samples with 1 evaluation per sample.
 Range (minmax):  480.223 ms488.267 ms   GC (min … max): 0.00% … 0.00%
 Time  (median):     480.654 ms                GC (median):    0.00%
 Time  (mean ± σ):   481.324 ms ±   2.314 ms   GC (mean ± σ):  0.00% ± 0.00%

  ▁█▁██                                                      ▁  
  █████▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ ▁
  480 ms           Histogram: frequency by time          488 ms <

 Memory estimate: 19.34 KiB, allocs estimate: 16.

Using perft_bishop_magic which uses magic bitboards for bishop move generation:

using OrbisChessEngine
using BenchmarkTools
b = Board()
perft_bishop_magic(b, 5) # warm up
@benchmark perft_bishop_magic($b, 5)
BenchmarkTools.Trial: 11 samples with 1 evaluation per sample.
 Range (minmax):  480.094 ms480.569 ms   GC (min … max): 0.00% … 0.00%
 Time  (median):     480.263 ms                GC (median):    0.00%
 Time  (mean ± σ):   480.280 ms ± 148.011 μs   GC (mean ± σ):  0.00% ± 0.00%

  ██      ██           █   ██    █                  █  
  ██▁▁▁▁▁▁██▁▁▁▁▁▁▁▁▁▁█▁▁▁▁▁▁▁▁█▁▁▁██▁▁▁▁█▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ ▁
  480 ms           Histogram: frequency by time          481 ms <

 Memory estimate: 19.34 KiB, allocs estimate: 16.

Seems to be barely affect performance.

Benchmarking search to depth 10 from starting position:

using OrbisChessEngine
using BenchmarkTools
b = Board()
search(b; depth = 4, opening_book = nothing) # warm up
@benchmark search($b; depth = 10, opening_book = nothing)
BenchmarkTools.Trial: 1 sample with 1 evaluation per sample.
 Single result which took 278.199 s (3.04% GC) to evaluate,
 with a memory estimate of 187.12 GiB, over 476409298 allocations.