|
|
|
|
|
by Jabbles
1454 days ago
|
|
> It has to handle multiple threads reading and replacing entries, with no locking. Is this undefined behavior or does the memory model of C++ guarantee anything given the reads/writes are presumably whole words? I realise that the implementation doesn't actually have to be deterministic, but does the language guarantee anything in these cases? |
|
This is all a bit hand-wavey, but there you have it. You could do this with atomics by shaving down the size of an entry to 64 bits(Stockfish uses 10 bytes), I suppose.