Memory store like map[string]interface{}
with better performance and safe concurrency.
Benchmark_DictPool-4 20000000 61.4 ns/op 0 B/op 0 allocs/op
Benchmark_DictPoolBytes-4 20000000 59.2 ns/op 0 B/op 0 allocs/op
Benchmark_DictMap-4 20000000 102 ns/op 0 B/op 0 allocs/op
Benchmark with Go 1.11
d := dictpool.AcquireDict()
key := "foo"
d.Set(key, "Hello DictPool")
if d.Has(key){
fmt.Println(d.Get(key)) // Output: Hello DictPool
}
d.Del(key)
dictpool.ReleaseDict(d)