Skip to content

Commit f0227c7

Browse files
NSHkrNSHkr
authored andcommitted
Remove quadradic bottleneck, use binary patt match. 449 tests, 0 failures, 36 excluded
1 parent f013d14 commit f0227c7

File tree

9 files changed

+1886
-57
lines changed

9 files changed

+1886
-57
lines changed

PERF_MONITOR.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Simple Performance Monitor
2+
3+
## Usage
4+
5+
```bash
6+
# 1. Set baseline (run once before optimizations)
7+
mix run scripts/perf_monitor.exs baseline
8+
9+
# 2. Check current performance (run anytime)
10+
mix run scripts/perf_monitor.exs current
11+
12+
# 3. Compare with baseline (run after changes)
13+
mix run scripts/perf_monitor.exs compare
14+
```
15+
16+
## What it tracks
17+
18+
- **Layer 3 processing time** for 10, 25, 50, 100 objects
19+
- **Processing rate** (KB/s)
20+
- **Scaling behavior** (Linear vs Quadratic)
21+
- **Improvement ratio** vs baseline
22+
23+
## Current baseline (O(n²) quadratic)
24+
25+
- 10 objects: ~5ms
26+
- 25 objects: ~18ms
27+
- 50 objects: ~66ms
28+
- 100 objects: ~291ms
29+
30+
## Optimization goals
31+
32+
- **5x improvement**: Phase 1 (IO Lists)
33+
- **10x improvement**: Phase 2 (Binary Pattern Matching)
34+
- **20x improvement**: Phase 3 (Single-Pass)
35+
- **30x improvement**: Phase 4 (Full Optimization)
36+
37+
**Target: 100 objects in <10ms (vs current 291ms)**

0 commit comments

Comments
 (0)