]> git.sesse.net Git - stockfish/commit
Slight speep up fetching the endgame table
authorJean Gauthier <jean.gauthier@programmer.net>
Wed, 14 Aug 2019 12:44:21 +0000 (08:44 -0400)
committerStéphane Nicolet <stephanenicoletsuriphone@gmail.com>
Wed, 21 Aug 2019 07:11:17 +0000 (09:11 +0200)
commitd4dca9187e83dde29be8d76ca50ff53d14199ce9
treeffe0fc67583026adb789d8296f8a1e2eae83de14
parent7efc39d6833a0d999a7bf2f9b5629ceb246accd2
Slight speep up fetching the endgame table

Replace calls to count(key) + operator[key] with a single call to find(key).
Replace the std::map with std::unordered_map which provide O(1) access,
although the map has a really small number of objects.

Test with [0..4] failed yellow:

TC 10+0.1
SPRT elo0: 0.00  alpha: 0.05  elo1: 4.00  beta: 0.05
LLR -2.96 [-2.94,2.94] (rejected)
Elo 1.01 [-0.87,3.08] (95%)
LOS 85.3%
Games 71860 [w:22.3%, l:22.2%, d:55.5%]
http://tests.stockfishchess.org/tests/view/5d5432210ebc5925cf109d61

Closes https://github.com/official-stockfish/Stockfish/pull/2269

No functional change
src/endgame.h