From 3883c4c32d628adee6d366059aa8c7c1eee5f72b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=B4=9C=C9=B4=E1=B4=8B=C9=B4=E1=B4=A1=E1=B4=8F=C9=B4?= Date: Sat, 4 Sep 2021 14:14:24 +0800 Subject: [PATCH] section: preallocate the size of keys hash --- section.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/section.go b/section.go index afaa97c..a3615d8 100644 --- a/section.go +++ b/section.go @@ -217,7 +217,7 @@ func (s *Section) KeysHash() map[string]string { defer s.f.lock.RUnlock() } - hash := map[string]string{} + hash := make(map[string]string, len(s.keysHash)) for key, value := range s.keysHash { hash[key] = value }