Skip to content

Commit e620e9f

Browse files
schoviclaude
andcommitted
docs: add benchmark results summary to README
Add comprehensive Benchmarks section with: - Link to benchmarks/README.md for details - System specifications - Compile time: +3.7s (30% overhead) - Binary size: 0.88x compression ratio - Memory: minimal overhead with lazy decompression - Performance: comparable latency/throughput - Clear recommendations on when to use BakedFileSystem Provides users with objective performance data to make informed decisions about using BakedFileSystem. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e285718 commit e620e9f

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed

README.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,73 @@ unless file = Assets.get?("missing/file")
116116
end
117117
```
118118

119+
## Benchmarks
120+
121+
Comprehensive benchmarking suite comparing BakedFileSystem against traditional File I/O. See [benchmarks/README.md](benchmarks/README.md) for detailed methodology and instructions.
122+
123+
### System Specifications
124+
125+
- **OS:** Darwin 25.0.0 (arm64) - Apple M4 Pro
126+
- **Crystal:** 1.17.1
127+
- **Test Date:** 2025-11-02
128+
129+
### Compile Time
130+
131+
Embedding ~1.2 MB of assets adds **3.7 seconds** to compilation time (30% overhead):
132+
133+
| Configuration | Mean Compile Time |
134+
|-----------------|-------------------|
135+
| Baseline | 12.27s |
136+
| BakedFileSystem | 15.98s |
137+
138+
### Binary Size
139+
140+
Automatic gzip compression achieves **0.88x ratio** (assets compressed to 88% of original size):
141+
142+
| Metric | Baseline | BakedFileSystem | Overhead |
143+
|-------------|----------|-----------------|-----------|
144+
| Binary Size | 1.69 MB | 2.72 MB | +1.03 MB |
145+
| Assets | - | 1.17 MB (raw) | - |
146+
147+
### Memory Usage
148+
149+
Minimal startup overhead with lazy decompression:
150+
151+
| Stage | Baseline | BakedFileSystem | Overhead |
152+
|-------------------|----------|-----------------|----------|
153+
| Startup | 5.02 MB | 5.08 MB | +0.06 MB |
154+
| After Small File | 5.97 MB | 5.20 MB | -0.77 MB |
155+
| After Medium File | 6.12 MB | 5.77 MB | -0.36 MB |
156+
| After Large File | 6.14 MB | 10.38 MB | +4.23 MB |
157+
158+
### Performance
159+
160+
Comparable latency and throughput (1000 requests, 10 concurrent clients):
161+
162+
| File Size | Baseline Latency | BakedFileSystem Latency | Throughput Baseline | Throughput Baked |
163+
|-----------|------------------|-------------------------|---------------------|------------------|
164+
| Small (1KB) | 0.17 ms | 0.17 ms | 56,034 req/s | 55,790 req/s |
165+
| Medium (100KB) | 0.17 ms | 0.17 ms | 56,588 req/s | 55,457 req/s |
166+
| Large (1MB) | 0.17 ms | 0.17 ms | 56,575 req/s | 54,922 req/s |
167+
168+
### Summary
169+
170+
**Use BakedFileSystem when:**
171+
- Deploying small to medium static assets (< 10 MB)
172+
- Single-binary deployment is preferred
173+
- Assets don't change frequently
174+
175+
**Benefits:**
176+
- ✅ Single binary with embedded assets
177+
- ✅ Automatic gzip compression (12% size reduction)
178+
- ✅ Minimal memory overhead
179+
- ✅ Comparable performance to file I/O
180+
181+
**Trade-offs:**
182+
- ⚠️ +3.7s compilation time
183+
- ⚠️ +1 MB binary size per 1 MB of assets
184+
- ⚠️ Assets fixed at compile time
185+
119186
## Development
120187

121188
TODO: Write development instructions here

0 commit comments

Comments
 (0)