Benchmarks — Mapanare

Cross-language benchmarks comparing Mapanare against Python, Go, and Rust. Each benchmark runs 3 times; median wall time reported.

Execution Performance

BenchmarkMN (Native)PythonGoRustvs Python
Fibonacci (n=35)0.045s1.189s0.034s0.021s26.5x
Message Passing (10K)1.098s0.003s0.020s1.1x (transpiled)
Stream Pipeline (1M)0.017s1.034s0.001s0.0001s62.8x
Matrix Multiply (100x100)0.020s0.456s0.001s0.001s22.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.