lynx-chess / Lynx

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

⚡ Avoid `static readonly` flat array initial allocations for inline arrays #948

Closed eduherminio closed 2 weeks ago

eduherminio commented 2 weeks ago

See https://devblogs.microsoft.com/dotnet/performance-improvements-in-net-8/#initialization

Test  | perf/remove-static-readonly-initial-allocations
Elo   | 1.23 +- 2.59 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 2.90 (-2.25, 2.89) [-3.00, 1.00]
Games | 30746: +8884 -8775 =13087
Penta | [858, 3417, 6664, 3626, 808]
https://openbench.lynx-chess.com/test/661/