-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSearchBenchmarks.cs
42 lines (37 loc) · 963 Bytes
/
SearchBenchmarks.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Jobs;
using ChessBot.Search;
namespace ChessBot.Benchmarks
{
[SimpleJob(RuntimeMoniker.NetCoreApp31, baseline: true)]
//[SimpleJob(RuntimeMoniker.Net48)]
[RPlotExporter]
public class SearchBenchmarks
{
[Params(5, 6, 7)]
public int Depth;
[Params(1 << 8, 1 << 12, 1 << 16)]
public int TtCapacity;
// todo: test on states besides startpos
[Benchmark]
public void Mtdf()
{
var mtdf = new Mtdf()
{
Depth = Depth,
};
mtdf.Tt = mtdf.MakeTt(TtCapacity);
mtdf.Search(State.Start);
}
[Benchmark]
public void MtdfIds()
{
var ids = new MtdfIds()
{
Depth = Depth,
};
ids.Tt = ids.MakeTt(TtCapacity);
ids.Search(State.Start);
}
}
}