]> git.sesse.net Git - stockfish/commit
Remove precomputed SquareBB
authorStephen Touset <stephen@touset.org>
Mon, 16 Jan 2023 22:25:47 +0000 (14:25 -0800)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sun, 22 Jan 2023 09:55:32 +0000 (10:55 +0100)
commit734315ff3099564c80737ad2be8121008870d28b
tree8174e2c06f44715685330dbc181d5d8ca1ff337e
parenta08b8d4e9711c20acedbfe17d618c3c384b339ec
Remove precomputed SquareBB

Bit-shifting is a single instruction, and should be faster than an array lookup
on supported architectures. Besides (ever so slightly) speeding up the
conversion of a square into a bitboard, we may see minor general performance
improvements due to preserving more of the CPU's existing cache.

passed STC:
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 47280 W: 12469 L: 12271 D: 22540
Ptnml(0-2): 128, 4893, 13402, 5087, 130
https://tests.stockfishchess.org/tests/view/63c5cfe618c20f4929c5fe46

Small speedup locally:

```
Result of  20 runs
==================
base (./stockfish.master       ) =    1752135  +/- 10943
test (./stockfish.patch        ) =    1763939  +/- 10818
diff                             =     +11804  +/- 4731

speedup        = +0.0067
P(speedup > 0) =  1.0000

CPU: 16 x AMD Ryzen 9 3950X 16-Core Processor
```

Closes https://github.com/official-stockfish/Stockfish/pull/4343

Bench: 4106793
src/bitboard.cpp
src/bitboard.h