Benchmarks

testmimas v0.0.0Python v3.14Rhai v1.25.1Rune v0.14.2Piccolo (Lua) v0.3.3
fibonacci0.58s0.21s1.86s0.61s0.47s
1mil loop0.08s0.06s0.09s0.08s0.03s
prime numbers0.51s0.39s1.06s0.73s0.25s
particles0.79s0.55s2.93s1.00s1.07s
shapes0.62s0.42s1.70s0.67s0.55s
  • Measured on a 2021 MacBook Pro M1 Max

What these measure

The first three are arithmetic, recursion, and tight loops — work that rewards a mature, heavily tuned interpreter (Python’s specializing interpreter especially).

The last two exercise mimas’s data abstractions:

  • particles — read and write struct fields in a hot loop (the cost of a record).
  • shapes — build a different enum variant each iteration and dispatch on it with match (the cost of a tagged variant).

Note

A note on fairness:

Each language models a record/variant with its own idiomatic construct. Rhai and Lua (Piccolo) have neither structs nor enums at the script level, so their particles and shapes rows use hash maps (Rhai object maps, Lua tables) — the only named-field option they offer. Those rows therefore measure the cost of the abstraction, not raw arithmetic throughput: read them as “what does modelling your data this way cost?”, not “which language computes faster”.

Caveats

mimas has had essentially no runtime optimization yet — no instruction specialization, and ADT construction allocates more than it needs to (each shapes iteration currently makes a few small allocations that planned work will remove). Expect these numbers to move.

Compile speed

Where the runtime is still young, the compiler is quick — for scripts there’s effectively no compile step you’d notice. The whole pipeline (parse, type-check, lower, and emit bytecode, with no execution) runs at roughly 400,000 lines per second.

programlinescompile
a small module~100< 1 ms
a project~10,000~25 ms
a large project~100,000~0.24 s

Measured with mimas build on the same M1 Max, over a representative corpus (consts, structs, enums, functions, deeply-nested types) generated by the fodder project (tools/fodder). Like the runtime numbers, expect these to move.

Reproduce

  • tools/benchmarks/compare.sh — cross-language wall-clock comparison (hyperfine).
  • tools/benchmarks/compile-bench.sh — compile throughput over generated source (mimas build).
  • cargo bench -p mimas — in-process VM and compile microbenchmarks, with per-run allocation counts (Divan).