From 40a3521607ebb5efb21a6c2c5b8394bd2bdea052 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sun, 1 Nov 2020 13:22:54 +0800 Subject: [PATCH] =?UTF-8?q?hashmap:=20=E5=A6=82=E6=9E=9C=E6=96=B0=20size?= =?UTF-8?q?=20=E5=B0=8F=E4=BA=8E=200x2000000=20=E5=B0=B1=E4=B8=8D=E6=89=A7?= =?UTF-8?q?=E8=A1=8C=20resize?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 以解决 UCI go 后执行很慢的问题。 --- src/hashmap.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hashmap.h b/src/hashmap.h index a8ac695a..9cd4227a 100644 --- a/src/hashmap.h +++ b/src/hashmap.h @@ -134,6 +134,12 @@ namespace CTSL //Concurrent Thread Safe Library void resize(size_t size) { + // TODO + if (size < 0x2000000) { + // New size is too small, do not resize + return; + } + hashSize = size; return; }