From 83140225ed57832d9d5aa8cd7f0a9ba80a210a84 Mon Sep 17 00:00:00 2001 From: werben Date: Thu, 10 Aug 2023 14:20:17 +0800 Subject: [PATCH] Both sync.Map and cowmap use atomic.Value atomic operations to access the map during data reading, resulting in similar read performance. However, sync.Map has better write performance. Therefore, cowmap directly utilizes sync.Map as its internal structure. --- cowmap_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/cowmap_test.go b/cowmap_test.go index 554bc6a..0de55d7 100644 --- a/cowmap_test.go +++ b/cowmap_test.go @@ -11,8 +11,6 @@ import ( func Test_NewCowMap(t *testing.T) { m := NewCowMap() assert.NotNil(t, m) - assert.NotNil(t, m.readable) -} } func Test_CowMapLoad(t *testing.T) {