Frist attempted in https://github.com/lynx-chess/Lynx/pull/997 with a concurrent dictionary,
After #999, we can guarantee the Move.UCIString() calls related to info commands to happen in a single thread, so we can re-try with a regular dictionary.
We also move here the serialization of bestmove command to the Writer thread to be able to do the same with UCIString() invocations there.
bench 14 comparisons (it should be more drastic in real games, where all positions are related to each other) show 50% less string allocations
Frist attempted in https://github.com/lynx-chess/Lynx/pull/997 with a concurrent dictionary, After #999, we can guarantee the
Move.UCIString()
calls related toinfo
commands to happen in a single thread, so we can re-try with a regular dictionary. We also move here the serialization ofbestmove
command to the Writer thread to be able to do the same withUCIString()
invocations there.bench 14
comparisons (it should be more drastic in real games, where all positions are related to each other) show 50% less string allocationsBefore:
This branch:
Together with #1002