Files
stockfish/src
Timothy HerchenandJoost VandeVondele fa4f05d3ef Don't copy around DirtyThreats
The contents of DirtyThreats gets memcpyed twice for each call to do_move.
(Return value optimization doesn't apply to the do_move function itself because
it constructs a std::pair, so it gets copied; and the calls to reset also
require a copy.) This patch inserts the dirty info in place.

Sometimes the caller of do_move ignores the DirtyThreats info, so we pass in
scratch objects. I found that stack-allocating these scratch objects was bad on
Fishtest, so I begrudgingly put them in the Position struct. Both templating
the do_move function on whether dirty threats are needed and putting a
null-check branch for each use of dirty threats were slowdowns locally. Of
course, nothing prevents a future attempt at cleaning this up.

passed STC
LLR: 2.96 (-2.94,2.94) <0.00,2.00>
Total: 68448 W: 17770 L: 17418 D: 33260
Ptnml(0-2): 198, 7425, 18630, 7769, 202
https://tests.stockfishchess.org/tests/view/6914c01a7ca87818523318ba

closes https://github.com/official-stockfish/Stockfish/pull/6414

No functional change
2025-11-13 22:17:03 +01:00
..
2024-12-22 15:16:01 +01:00
2025-11-13 22:17:03 +01:00
2025-01-06 00:45:28 +01:00
2025-11-02 16:04:09 +01:00
2025-10-14 17:27:42 +02:00
2025-11-02 16:04:09 +01:00
2025-07-24 10:08:35 +02:00
2025-07-24 10:08:35 +02:00
2025-11-02 16:04:09 +01:00
2025-11-13 22:17:03 +01:00
2025-11-13 22:17:03 +01:00
2025-01-06 00:45:28 +01:00
2025-01-06 00:45:28 +01:00
2025-11-13 22:17:03 +01:00
2025-11-02 16:04:09 +01:00
2025-11-02 16:04:09 +01:00
2025-01-06 00:45:28 +01:00
2025-10-14 17:46:13 +02:00
2025-10-14 17:46:13 +02:00
2025-05-19 07:17:39 +02:00
2025-06-02 21:55:55 +02:00
2025-02-02 13:49:54 +01:00
2025-07-24 10:28:17 +02:00
2025-08-02 15:54:10 +02:00
2025-05-19 07:17:39 +02:00