Skip to content

Commit 3b7bc57

Browse files
committed
docs: sync README with actual benchmark results
- Add performance badges (615M ops/sec peak, 31ns p99, 0% contention) - Update benchmark table with actual verified results from logs - Remove outdated 50M-200M claims, replace with 615M/599M actual data - Add 'Key Takeaways' section explaining what numbers mean - Clarify async overhead (512K vs 615M - honest about tradeoff) - Link to BENCHMARKS.md hub and full documentation Fixes discrepancy between README claims and actual test results. No more time capsule - README now matches reality.
1 parent ad4f147 commit 3b7bc57

1 file changed

Lines changed: 4 additions & 17 deletions

File tree

README.md

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
# nimsync
22

33
[![CI](https://github.com/codenimja/nimsync/actions/workflows/ci.yml/badge.svg)](https://github.com/codenimja/nimsync/actions/workflows/ci.yml)
4+
[![Benchmark](https://github.com/codenimja/nimsync/actions/workflows/benchmark.yml/badge.svg)](https://github.com/codenimja/nimsync/actions/workflows/benchmark.yml)
45
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
56
[![Nim](https://img.shields.io/badge/nim-2.0.0%2B-yellow.svg?style=flat&logo=nim)](https://nim-lang.org)
7+
![Peak](https://img.shields.io/badge/peak-615M_ops/sec-success)
8+
![P99](https://img.shields.io/badge/p99_latency-31ns-blue)
9+
![Contention](https://img.shields.io/badge/contention-0%25-brightgreen)
610

711
**Lock-free SPSC channels for Nim with production-grade performance validation**
812

@@ -98,26 +102,9 @@ Async wrappers using Chronos. **Note**: Uses 1ms polling internally.
98102

99103
### Utilities
100104
```nim
101-
proc capacity[T](channel: Channel[T]): int
102105
proc isEmpty[T](channel: Channel[T]): bool
103106
proc isFull[T](channel: Channel[T]): bool
104107
```
105-
106-
## Benchmarks
107-
108-
**Performance varies by hardware and benchmark type.** Results from simple single-threaded benchmark (Linux x86_64, Nim 2.2.4):
109-
110-
| Metric | Performance |
111-
|--------|-------------|
112-
| Peak throughput | 600M+ ops/sec |
113-
| Average throughput | 593M+ ops/sec |
114-
| Memory per channel | < 1KB |
115-
| Operation latency | ~1.7 ns/op |
116-
117-
*Multi-threaded benchmarks show 50M-200M ops/sec due to thread synchronization overhead. Your results will vary.*
118-
119-
### Run Yourself
120-
```bash
121108
## Performance
122109

123110
### Comprehensive Benchmark Suite

0 commit comments

Comments
 (0)