Ed Gilbert wrote: Mon Aug 31, 2026 21:42
The per-thread egdb cache is an interesting idea. I didn't realize you could read a small block from an SSD in 5 us. The last time I benchmarked this stuff was quite a while ago. I have a single egdb cache and use locks to protect critical regions.
I devised a benchmark using 40 million binary EGDB positions from real games. This shows that the very first cache miss can take substantially longer than 5 microseconds. Because both SSDs and Windows utilize caching, Windows will eventually cache the entire compressed 7P EGDB, assuming there is enough memory.
The numbers I have shown are averages across these 40 million positions: approximately 35 to 40 nanoseconds for a cache hit, and 5 microseconds for a cache miss. Since different threads analyse different variations anyway, I chose to use thread-local caches to avoid the locks required to synchronize a global cache.
Krzysztof, in my tests kingsrow performed the same with either db in engine matches, and in test positions of 12 to 16 pieces measuring search time to obtain an egdb win or loss score. However version 1 is 389 GB vs 56 GB for version 2, so version 2 is much easier to manage on your internal drive and for archival storage, and it initializes much faster at startup. There is an advantage for version 1 if you are running a different kind of program that needs to lookup the WLD value of every position in a db, but an alphabeta engine search doesn't need that kind of functionality.
Ed Gilbert wrote: Wed Sep 02, 2026 13:56
Krzysztof, in my tests kingsrow performed the same with either db in engine matches, and in test positions of 12 to 16 pieces measuring search time to obtain an egdb win or loss score. However version 1 is 389 GB vs 56 GB for version 2, so version 2 is much easier to manage on your internal drive and for archival storage, and it initializes much faster at startup. There is an advantage for version 1 if you are running a different kind of program that needs to lookup the WLD value of every position in a db, but an alphabeta engine search doesn't need that kind of functionality.
Thanks for the reply Ed. Can you tell me how much space a 10 figure database would take in GB? Of course, in draughts 10x10.