Skip to content

Commit 9f6bfba

Browse files
committed
chore: update benchmark output in README.md for clarity
- Added system information to benchmark results for better context. - Updated benchmark results to reflect recent performance measurements.
1 parent 61770a5 commit 9f6bfba

1 file changed

Lines changed: 23 additions & 11 deletions

File tree

README.md

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,13 @@ go test -bench=. -benchmem
8585
For this benchmark, memory was created with the following specs: `1024 bytes per record`, `4096 records per shard`, `256 shards (max)`.
8686

8787
```
88-
BenchmarkCacheNewMedium-12 291 3670372 ns/op 22776481 B/op 12408 allocs/op
89-
BenchmarkCacheSetMedium-12 1928548 620.3 ns/op 63 B/op 1 allocs/op
90-
BenchmarkCacheGetMedium-12 16707145 69.87 ns/op 0 B/op 0 allocs/op
88+
goos: linux
89+
goarch: amd64
90+
pkg: github.com/praserx/atomic-cache/v2
91+
cpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
92+
BenchmarkCacheNewMedium-12 288 4109240 ns/op 22750002 B/op 12405 allocs/op
93+
BenchmarkCacheSetMedium-12 4499152 269.8 ns/op 16 B/op 0 allocs/op
94+
BenchmarkCacheGetMedium-12 19747963 59.72 ns/op 0 B/op 0 allocs/op
9195
```
9296

9397
*If you want do some special bencharking, go ahead.*
@@ -96,18 +100,26 @@ BenchmarkCacheGetMedium-12 16707145 69.87 ns/op 0 B/op
96100

97101
**SET**
98102
```
99-
BenchmarkAtomicCacheSet-12 2921170 413.0 ns/op 55 B/op 2 allocs/op
100-
BenchmarkBigCacheSet-12 3448020 345.5 ns/op 0 B/op 0 allocs/op
101-
BenchmarkFreeCacheSet-12 4777364 217.2 ns/op 65 B/op 1 allocs/op
102-
BenchmarkHashicorpCacheSet-12 6208528 202.2 ns/op 65 B/op 3 allocs/op
103+
goos: linux
104+
goarch: amd64
105+
pkg: github.com/praserx/atomic-cache/v2
106+
cpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
107+
BenchmarkAtomicCacheSet-12 5755452 195.3 ns/op 27 B/op 1 allocs/op
108+
BenchmarkBigCacheSet-12 4290684 286.9 ns/op 0 B/op 0 allocs/op
109+
BenchmarkFreeCacheSet-12 5806412 199.3 ns/op 65 B/op 1 allocs/op
110+
BenchmarkHashicorpCacheSet-12 6333306 170.0 ns/op 65 B/op 3 allocs/op
103111
```
104112

105113
**GET**
106114
```
107-
BenchmarkAtomicCacheGet-12 9697010 121.7 ns/op 0 B/op 0 allocs/op
108-
BenchmarkBigCacheGet-12 4031352 295.3 ns/op 88 B/op 2 allocs/op
109-
BenchmarkFreeCacheGet-12 4813386 276.8 ns/op 88 B/op 2 allocs/op
110-
BenchmarkHashicorpCacheGet-12 11071472 107.4 ns/op 16 B/op 1 allocs/op
115+
goos: linux
116+
goarch: amd64
117+
pkg: github.com/praserx/atomic-cache/v2
118+
cpu: Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
119+
BenchmarkAtomicCacheGet-12 13004460 97.27 ns/op 0 B/op 0 allocs/op
120+
BenchmarkBigCacheGet-12 4403041 272.5 ns/op 88 B/op 2 allocs/op
121+
BenchmarkFreeCacheGet-12 5586747 231.9 ns/op 88 B/op 2 allocs/op
122+
BenchmarkHashicorpCacheGet-12 11445339 99.70 ns/op 16 B/op 1 allocs/op
111123
```
112124

113125
## License

0 commit comments

Comments
 (0)