-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Simplify KPK classify #2485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify KPK classify #2485
Conversation
|
Doesn't even compile here!
And seems to take a tiny fraction more time (after removing constexpr from Result): patch |
|
Ah, not compiling should definitely be fixed, but taking 0.0003 seconds more for initialization time is not really an issue, it can even be considered a feature if we use these 0.3 milliseconds to relax and do zen meditation. |
|
@joergoster You seem to not have all of the changes. The commit clearly changes the constexpr to "const." |
|
@protonspring You're right! I apologize, I simply missed them ... |
|
Good news. I thought I was going crazy. |
|
The color parm is removed by just using the KPK instance color variable stm. My binary is now a tiny bit different (12 bytes). Does this need tested now? |
|
My current plan is to merge simplifications after the SF11 release, please delay any new test a little bit to help https://tests.stockfishchess.org/tests/view/5e1bbedfd12216a2857e63a4 :-) |
|
Merged via 75dfdea, thanks! |
This is a non-functional simplification. If we pass the color the entry instead of the template, one of the classify methods goes away.
Furthermore, I've resolved the colors in some of the statements (we're already assuming direction using NORTH), and used stm (side to move) instead of "us," since this is much more clear to me.
This is not tested because it is non-functional, only applies building the bitbase and there are no changes to the binary (on my machine).
EDIT: See changes below.