this is a golang binding for nildb C api.
benchmark (Intel(R) Core(TM) i7-8700K CPU @ 4.50GHz, 6 core 12 thread):
goos: linux
goarch: amd64
pkg: bitbucket.org/8ox86/nildb
BenchmarkOpen100-12 1000000 2184 ns/op
BenchmarkOpen1000-12 1000000 2189 ns/op
BenchmarkGet-12 1000000 1152 ns/op
BenchmarkSet-12 500000 14261 ns/op
BenchmarkSave100-12 10000 203917 ns/op
BenchmarkSave10000-12 10000 206707 ns/op
PASS
ok bitbucket.org/8ox86/nildb 17.072s
NIL Key/Value database
NILDB is about the simplest key/value store you'll ever see, anywhere. It's written in plain vanilla C using only the standard string and FILE I/O functions, and should port to just about anything with a disk or something that acts like one.
NILDB is based on KISSDB, with significant update to reduce file size and improve efficiency, and also added the capability to delete entries.
It stores keys and values of fixed length in a stupid-simple file format based on fixed-size hash tables. If a hash collision occurrs, a link list is created and the entry is appended to the database. You can add, update, lookup and delete.
Hash table size is a space/speed trade-off parameter. Larger hash tables will reduce collisions and speed things up a bit, at the expense of memory and disk space. A good size is usually about 1/2 the average number of entries you expect.
Features:
Limitations:
Alternative key/value stores and embedded databases:
NILDB is in the public domain as according to the Creative Commons Public Domain Dedication.
Author: Tiebing Zhang, Circle Media Inc; Adam Ierymenko / ZeroTier Networks LLC
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。