lynx-chess / Lynx

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

⚡ Use fixed pointer trick in pinned arrays II #967

Closed eduherminio closed 2 months ago

eduherminio commented 2 months ago

Use fixed (int* ptr = &_array[0]) for accessing history arrays in helpers (https://github.com/lynx-chess/Lynx/pull/966) + Use it also to read when updating the same entry that was just read

Test  | perf/fixed-trick-pinned-2
Elo   | -5.01 +- 4.53 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | -2.26 (-2.25, 2.89) [0.00, 3.00]
Games | 10130: +2788 -2934 =4408
Penta | [314, 1168, 2171, 1174, 238]
https://openbench.lynx-chess.com/test/680/