You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure if it's due to device or Golang version issues. I suggest you run the built-in performance testing program first. Currently, the agreed upon performance value is based on 20% write and 80% read scenarios. At present, some test codes can refer to: https://github.com/heiyeluren/xds/blob/main/xmap/map_test.go
`package main
import (
"math/rand"
"strconv"
"sync"
"testing"
)
var keys = make([]string, 10000000)
func init() {
for i := 0; i < 10000000; i++ {
keys[i] = strconv.Itoa(rand.Int())
}
}
// 1000000000
func BenchmarkCHM_Put(b *testing.B) {
f := &xmm.Factory{}
mm, err := f.CreateMemory(0.75)
if err != nil {
b.Fatal(err)
}
chm, err := xmap.NewConcurrentHashMap(mm, 16, 2, 8, xds.String, xds.String)
if err != nil {
b.Fatal(err)
}
}
func BenchmarkStdmap(b *testing.B) {
m := make(map[string]string)
}
func BenchmarkSyncmap(b *testing.B) {
m := sync.Map{}
}
`
The text was updated successfully, but these errors were encountered: