Benchmarks — Mapanare
Cross-language benchmarks comparing Mapanare against Python, Go, and Rust. Each benchmark runs 3 times; median wall time reported.
Execution Performance
| Benchmark | MN (Native) | Python | Go | Rust | vs Python |
|---|---|---|---|---|---|
| Fibonacci (n=35) | 0.045s | 1.189s | 0.034s | 0.021s | 26.5x |
| Message Passing (10K) | — | 1.098s | 0.003s | 0.020s | 1.1x (transpiled) |
| Stream Pipeline (1M) | 0.017s | 1.034s | 0.001s | 0.0001s | 62.8x |
| Matrix Multiply (100x100) | 0.020s | 0.456s | 0.001s | 0.001s | 22.9x |
The LLVM native backend delivers 22-63x speedups over Python.
Stream Pipeline Microbenchmarks
fold_sum: 10.3M items/sec. take(1000): 6.3M items/sec. filter: 4.2M items/sec. map: 4.2M items/sec.
Code Expressiveness
Mapanare uses ~44% fewer lines than Python, ~53% fewer than Go, and ~54% fewer than Rust on average.
Methodology
Fibonacci: pure computation. Message Passing: agent spawn/send/sync with 4 concurrent workers. Stream Pipeline: stream(), map(), filter(), fold() with fusion. Matrix Multiply: nested loops and arithmetic.