jordanbray / chess

A rust library to manage chess move generation

Home Page:https://jordanbray.github.io/chess/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Board.status unnecessarily calculates all legal moves

AlexanderHarrison opened this issue · comments

Since Board.status only needs to check if there are legal moves or not, it is slow and pointless to calculate all legal moves, especially since this would often be in hot code areas (search/eval functions).

Perf says Board.status takes around a third of my engine's running time, so this is an issue.

Edit: Board.status takes around 20% of my engine's running time with this change.