Show HN: A simple zero-dependency in-memory key-value store for Golang (github.com)
There are plenty of other caches and KV stores out there, but this one aims to minimise the surface a bit more:
- There's less error handling required due to some code simplifications made
- It stores only strings so no type-casting is required
- There are no mutexes involved so we're not locking writes at any point
This is one of my first OSS contributions so I'd love some feedback :)
4 comments
[ 2.8 ms ] story [ 19.6 ms ] threadOn my hardware, a simple Set->Get scenario takes TBKV 1500 ns/op where sync.Map takes only ~80 ns/op to perform the same task.
That's a 20x difference in duration :(
The benchmark code is already in master.
Maybe it would be good to be able to pass a context for the store, so the loop stops when the context cancelled.