@@ -9,14 +9,15 @@ import (
9
9
"time"
10
10
)
11
11
12
- const NGOS = 2 // number of concurrent go routines for read/load tests
12
+ const NGOS = 8 // number of concurrent go routines for read/load tests
13
13
const Mask = (1024 * 1024 ) - 1
14
14
15
15
var um = go_concurrency .NewUnsharedCache ()
16
16
var lm = go_concurrency .NewLockCache ()
17
17
var sm = go_concurrency .NewSyncCache ()
18
18
var cm = go_concurrency .NewChannelCache ()
19
19
var sc = go_concurrency .NewShardCache ()
20
+ var ssc = go_concurrency .NewSharedShardCache ()
20
21
var im = go_concurrency .NewIntMap (256000 ) // so there are 4x collisions
21
22
var im2 = go_concurrency .NewIntMap (1000000 ) // so there are no collisions
22
23
@@ -80,8 +81,8 @@ func BenchmarkMain(m *testing.B) {
80
81
m .ResetTimer ()
81
82
82
83
impls := []go_concurrency.Cache {um , lm , sm , cm , sc , im , im2 }
83
- names := []string {"unshared" , "lock" , "sync" , "channel" , "shard" , "intmap" , "intmap2" }
84
- multi := []bool {false , true , true , true , false , true , true }
84
+ names := []string {"unshared" , "lock" , "sync" , "channel" , "shard" , "shareshard" , " intmap" , "intmap2" }
85
+ multi := []bool {false , true , true , true , false , true , true , true }
85
86
86
87
for i := 0 ; i < len (impls ); i ++ {
87
88
impl := impls [i ]
0 commit comments