FastDB is an (persistent) in-memory key/value store in Go.
I made some updates to comments I've got
(A big thank you to ShotgunPayDay)
Test coverage : 96.54%
https://codeberg.org/marcelloh/fastdb
A test does the following: - Populate 1,000 items with rdom.Intn(1000000).
- Inside for range b.N, execute Get with rand.Intn(1000000).
These are the benchmarks against other repos:
goos: windows goarch: amd64 pkg: github.com/marcelloh/fastdbbm cpu: AMD RYZEN AI MAX+ 395 w/ Radeon 8060S Benchmark_Badger_Get_File_1000-32 1614211 703.9 ns/op 468 B/op 11 allocs/op Benchmark_Bolt_Get_File_1000-32 3280322 386.0 ns/op 471 B/op 7 allocs/op Benchmark_FastDB_Get_File_1000-32 40616558 27.21 ns/op 0 B/op 0 allocs/op Benchmark_Moxydb_Get_File_1000-32 13624874 84.13 ns/op 51 B/op 2 allocs/op Benchmark_Pogreb_Get_File_1000-32 6821130 174.2 ns/op 32 B/op 2 allocs/op Benchmark_Rosedb_Get_File_1000-32 4519728 259.9 ns/op 90 B/op 4 allocs/op PASS
[link] [留言]