Skip to content
/ dictpool Public
forked from savsgio/dictpool

Memory store like map[string]interface{} with better performance and safe concurrency.

License

Notifications You must be signed in to change notification settings

mytxd/dictpool

 
 

Repository files navigation

dictpool

Build Status Go Report Card GoDoc

Memory store like map[string]interface{} with better performance and safe concurrency.

Benchmarks:

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

Example:

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)

About

Memory store like map[string]interface{} with better performance and safe concurrency.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 100.0%