lynx-chess / Lynx

Chess Engine, written in C#
https://lichess.org/@/Lynx_BOT
MIT License
47 stars 4 forks source link

⚡ Make `SearchResult.Moves` an array and optimize its population #986

Closed eduherminio closed 2 months ago

eduherminio commented 2 months ago

Make SearchResult.Moves an array and optimize its population from _pvTable using Span.

Test  | perf/searchresult-moves-array
Elo   | 2.48 +- 4.22 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 2.89 (-2.25, 2.89) [-5.00, 0.00]
Games | 11056: +3158 -3079 =4819
Penta | [248, 1279, 2427, 1294, 280]
https://openbench.lynx-chess.com/test/702/