Closed R-Goc closed 2 months ago
A test using a long startpos search looks promising (5-10% speedup), I'm now running an OpenBench test for your change. As to your point about bench not providing full coverage, it is indeed too short of a bench; I'll add a more comprehensive bench after this test whether it passes or fails.
(If it fails, I'll test again with the new bench, and probably wind up merging your commit and then adding the new bench in a separate commit.) Thank you very much for taking the time to contribute to Patricia, by the way. I definitely appreciate it.
As is said this is rather naive. Doesn't fully support windows (because of paths: cmd no prefix, powershell .\ prefix, unix-like shell ./ prefix). Works on msys and linux.
It actually works just fine on Windows (at least using cmd prompt) as is. I can't run "./patricia bench" on cmd without getting an error, but the Makefile can and does. I'm not entirely sure how that works but I'm not complaining.
Current state of the test btw:
Elo | 1.82 +- 2.53 (95%)
SPRT | 8.0+0.08s Threads=1 Hash=16MB
LLR | 0.99 (-2.94, 2.94) [0.00, 3.00]
Games | N: 26324 W: 7897 L: 7759 D: 10668
Penta | [450, 2873, 6425, 2917, 497]
Sorry, I've tested and tested and I can't find any sort of a speedup in it. I tried to use a bigger bench and it didn't help either. Thanks for trying, and I've accepted the pull request for the other commit.
A naive PGO implementation. Needs benchmarking. One possible problem is that bench doesn't provide full code coverage of all of search.(checked with llvm-cov)