billforsternz / thc-chess-library

General Purpose Rules of Chess Library for C++
MIT License
38 stars 13 forks source link

Don't do unnecassary computation for `GenLegalMoveList(list)` #5

Closed vagrawal closed 4 years ago

vagrawal commented 4 years ago

Currently GenLegalMoveList(list) does computation for the state of next position(check, checkmate, stalemate) which is not required. This change speeds up the function call by 10 times.

Let me know if I should make changes in the combined files like thc-regen.cpp.

billforsternz commented 4 years ago

This is insane and insanely brilliant. My legal move generation has always been too slow, and I've planned on speeding it up for years!