Skip to content
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

Optimize attackers_to() #5762

Closed
wants to merge 1 commit into from

Conversation

mstembera
Copy link
Contributor

https://tests.stockfishchess.org/tests/view/6782decb6ddf09c0b4b6e1b0
LLR: 2.93 (-2.94,2.94) <0.00,2.00>
Total: 105920 W: 27571 L: 27181 D: 51168
Ptnml(0-2): 284, 10808, 30403, 11164, 301

  • If we only need to know if attackers exist we can skip some calculations.
  • Also calculating slider/magic attackers first is better because the double lookup is slow due to memory latency.
  • I also included a couple of very minor cleanups in search that probably don't warrant their own PR but I can open separately if that's better.

No functional change
bench: 999324

No functional change
bench: 999324
Copy link

clang-format 18 needs to be run on this PR.
If you do not have clang-format installed, the maintainer will run it when merging.
For the exact version please see https://packages.ubuntu.com/noble/clang-format-18.

(execution 12728284853 / attempt 1)

@Disservin Disservin added the to be merged Will be merged shortly label Jan 12, 2025
@Disservin Disservin closed this in b84c880 Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to be merged Will be merged shortly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants