sugyan / yasai

Yet Another Shogi library, for AI development
GNU General Public License v3.0
25 stars 4 forks source link

SIMD Bitboard for AArch64 NEON #19

Closed sugyan closed 2 years ago

sugyan commented 2 years ago

Reference benchmark results of current main branch:

test movegen::bench_legal_moves_from_default ... bench:         791 ns/iter (+/- 7)
test movegen::bench_legal_moves_maximum      ... bench:       2,702 ns/iter (+/- 28)

test perft::bench_perft_3_from_maximum_moves ... bench: 184,985,674 ns/iter (+/- 515,476)
test perft::bench_perft_5_from_default       ... bench: 193,978,000 ns/iter (+/- 328,628)

(MacBook Pro (14-inch, 2021), Apple M1 Pro)

sugyan commented 2 years ago

Benchmark results: cargo +nightly bench --features simd

test movegen::bench_legal_moves_from_default ... bench:         754 ns/iter (+/- 6)
test movegen::bench_legal_moves_maximum      ... bench:       3,731 ns/iter (+/- 290)

test perft::bench_perft_3_from_maximum_moves ... bench: 268,558,683 ns/iter (+/- 7,711,579)
test perft::bench_perft_5_from_default       ... bench: 186,670,454 ns/iter (+/- 468,640)

🤔

sugyan commented 2 years ago
test movegen::bench_legal_moves_from_default ... bench:         734 ns/iter (+/- 32)
test movegen::bench_legal_moves_maximum      ... bench:       3,591 ns/iter (+/- 46)

test perft::bench_perft_3_from_maximum_moves ... bench: 264,865,983 ns/iter (+/- 5,023,125)
test perft::bench_perft_5_from_default       ... bench: 177,870,258 ns/iter (+/- 5,677,530)

🤔 🤔

sugyan commented 2 years ago

https://gist.github.com/sugyan/03c1e73a253b4591dc9f29f9609ad93e

sugyan commented 2 years ago
test movegen::bench_legal_moves_from_default ... bench:         713 ns/iter (+/- 4)
test movegen::bench_legal_moves_maximum      ... bench:       2,244 ns/iter (+/- 24)

test perft::bench_perft_3_from_maximum_moves ... bench: 144,351,295 ns/iter (+/- 4,494,884)
test perft::bench_perft_5_from_default       ... bench: 163,217,308 ns/iter (+/- 224,423)