mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Tweak nnue_accumulator indexing
``` LLR: 2.93 (-2.94,2.94) <0.00,2.00> Total: 92736 W: 24149 L: 23764 D: 44823 Ptnml(0-2): 280, 10056, 25334, 10395, 303 ``` The use of `IndexType` in the loops is suboptimal because it requires truncation to 32 bits, and thereby defeats some optimizations. Using `size_t` for the loop body works nicely, and a signed index into the index lists allows the compiler to assume the case `added.size() == UINT_MAX`, which would be an infinite loop, to not happen. Passed STC https://tests.stockfishchess.org/tests/live_elo/692fd98ab23dfeae38d01d98 closes https://github.com/official-stockfish/Stockfish/pull/6466 No functional change
This commit is contained in:
committed by
Disservin
parent
e1c919fd7e
commit
e0e6fdf094
@@ -134,6 +134,7 @@ class ValueList {
|
||||
|
||||
public:
|
||||
std::size_t size() const { return size_; }
|
||||
int ssize() const { return int(size_); }
|
||||
void push_back(const T& value) {
|
||||
assert(size_ < MaxSize);
|
||||
values_[size_++] = value;
|
||||
|
||||
Reference in New Issue
Block a user