Skip to content

Commit 50e1014

Browse files
Thomas StrombergThomas Stromberg
authored andcommitted
README tuning
1 parent 5674201 commit 50e1014

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bdcache - Big Dumb Cache
22

3-
<img src="media/logo-small.png" alt="bdcache logo" width="256" align="right">
3+
<img src="media/logo-small.png" alt="bdcache logo" width="256">
44

55
[![Go Reference](https://pkg.go.dev/badge/github.com/codeGROOVE-dev/bdcache.svg)](https://pkg.go.dev/github.com/codeGROOVE-dev/bdcache)
66
[![Go Report Card](https://goreportcard.com/badge/github.com/codeGROOVE-dev/bdcache)](https://goreportcard.com/report/github.com/codeGROOVE-dev/bdcache)
@@ -22,10 +22,10 @@ go get github.com/codeGROOVE-dev/bdcache
2222
// Memory only
2323
cache, err := bdcache.New[string, int](ctx)
2424
if err != nil {
25-
panic(err)
25+
return err
2626
}
2727
if err := cache.Set(ctx, "answer", 42, 0); err != nil {
28-
panic(err)
28+
return err
2929
}
3030
val, found, err := cache.Get(ctx, "answer")
3131

@@ -71,9 +71,9 @@ Benchmarks on MacBook Pro M4 Max comparing memory-only Get operations:
7171
Independent benchmark using [scalalang2/go-cache-benchmark](https://github.com/scalalang2/go-cache-benchmark) (500K items, Zipfian distribution):
7272

7373
**Hit Rate Leadership:**
74+
- **0.1% cache size**: bdcache **48.12%** vs SIEVE 47.42%, TinyLFU 47.37%, S3-FIFO 47.16%
7475
- **1% cache size**: bdcache **64.45%** vs TinyLFU 63.94%, Otter 63.60%, S3-FIFO 63.59%, SIEVE 63.33%
7576
- **10% cache size**: bdcache **80.39%** vs TinyLFU 80.43%, Otter 79.86%, S3-FIFO 79.84%
76-
- **0.1% cache size**: bdcache **48.12%** vs SIEVE 47.42%, TinyLFU 47.37%, S3-FIFO 47.16%
7777

7878
Consistently ranks top 1-2 for hit rate across all cache sizes while maintaining competitive throughput (5-12M QPS). The S3-FIFO implementation prioritizes cache efficiency over raw speed, making bdcache ideal when hit rate matters.
7979

0 commit comments

Comments
 (0)