hashmap: 如果新 size 小于 0x2000000 就不执行 resize

以解决 UCI go 后执行很慢的问题。
This commit is contained in:
Calcitem 2020-11-01 13:22:54 +08:00
parent 875bba4852
commit 40a3521607
1 changed files with 6 additions and 0 deletions

View File

@ -134,6 +134,12 @@ namespace CTSL //Concurrent Thread Safe Library
void resize(size_t size) void resize(size_t size)
{ {
// TODO
if (size < 0x2000000) {
// New size is too small, do not resize
return;
}
hashSize = size; hashSize = size;
return; return;
} }