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

Add fallback for BMI or BMI2 instructions #4

Merged
merged 4 commits into from Aug 17, 2023
Merged

Add fallback for BMI or BMI2 instructions #4

merged 4 commits into from Aug 17, 2023

Conversation

teswayze
Copy link
Owner

@teswayze teswayze commented Aug 17, 2023

I benchmarked this by searching to depth 12 from the starting position. The build without BMI/BMI2 took over 50% longer (1392ms vs 2101ms).

Without BMI/BMI2:

debug on
position startpos
go depth 12
info depth 1 time 0 nodes 9 pv d2d4 score cp 50
info depth 2 time 0 nodes 47 pv d2d4 d7d5 score cp 4
info depth 3 time 1 nodes 215 pv d2d4 d7d5 g1f3 score cp 32
info depth 4 time 2 nodes 971 pv d2d4 d7d5 g1f3 g8f6 score cp 4
info depth 5 time 5 nodes 2527 pv d2d4 d7d5 g1f3 g8f6 b1c3 score cp 23
info depth 6 time 13 nodes 9524 pv d2d4 d7d5 g1f3 g8f6 b1c3 b8c6 score cp 4
info depth 7 time 28 nodes 25088 pv g1f3 d7d5 e2e3 c8f5 f1d3 f5d3 c2d3 score cp 27
info depth 8 time 88 nodes 96415 pv e2e4 b8c6 d2d4 e7e6 g1f3 d7d5 b1c3 g8f6 score cp 17
info depth 9 time 177 nodes 221525 pv e2e4 e7e6 d2d4 d7d5 b1c3 g8f6 e4e5 f6e4 g1f3 score cp 24
info depth 10 time 326 nodes 435973 pv e2e4 e7e6 d2d4 d7d5 b1c3 b8c6 g1f3 g8f6 e4e5 f6g4 score cp 22
info depth 11 time 871 nodes 1159341 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8c5 f3e5 c5d4 e5f3 b8c6 d2d3 score cp 30
info depth 12 time 2101 nodes 2790674 pv e2e4 e7e6 g1f3 d7d5 e4d5 e6d5 f1d3 c7c5 e1g1 c5c4 f1e1 f8e7 d3e2 score cp 15
bestmove e2e4
quit

With BMI/BMI2:

debug on
position startpos
go depth 12
info depth 1 time 0 nodes 9 pv d2d4 score cp 50
info depth 2 time 0 nodes 47 pv d2d4 d7d5 score cp 4
info depth 3 time 0 nodes 215 pv d2d4 d7d5 g1f3 score cp 32
info depth 4 time 2 nodes 971 pv d2d4 d7d5 g1f3 g8f6 score cp 4
info depth 5 time 4 nodes 2527 pv d2d4 d7d5 g1f3 g8f6 b1c3 score cp 23
info depth 6 time 10 nodes 9524 pv d2d4 d7d5 g1f3 g8f6 b1c3 b8c6 score cp 4
info depth 7 time 23 nodes 25088 pv g1f3 d7d5 e2e3 c8f5 f1d3 f5d3 c2d3 score cp 27
info depth 8 time 69 nodes 96415 pv e2e4 b8c6 d2d4 e7e6 g1f3 d7d5 b1c3 g8f6 score cp 17
info depth 9 time 137 nodes 221525 pv e2e4 e7e6 d2d4 d7d5 b1c3 g8f6 e4e5 f6e4 g1f3 score cp 24
info depth 10 time 244 nodes 435973 pv e2e4 e7e6 d2d4 d7d5 b1c3 b8c6 g1f3 g8f6 e4e5 f6g4 score cp 22
info depth 11 time 596 nodes 1159341 pv e2e4 e7e5 b1c3 g8f6 g1f3 f8c5 f3e5 c5d4 e5f3 b8c6 d2d3 score cp 30
info depth 12 time 1392 nodes 2790674 pv e2e4 e7e6 g1f3 d7d5 e4d5 e6d5 f1d3 c7c5 e1g1 c5c4 f1e1 f8e7 d3e2 score cp 15
bestmove e2e4
quit

@teswayze teswayze merged commit 9fa28dd into main Aug 17, 2023
1 check passed
@teswayze teswayze deleted the mbmi-fallback branch August 17, 2023 04:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant