Benchmarks
| test | mimas v0.0.0 | Python v3.14 | Rhai v1.25.1 | Rune v0.14.2 | Piccolo (Lua) v0.3.3 |
|---|---|---|---|---|---|
| fibonacci | 0.58s | 0.21s | 1.86s | 0.61s | 0.47s |
| 1mil loop | 0.08s | 0.06s | 0.09s | 0.08s | 0.03s |
| prime numbers | 0.51s | 0.39s | 1.06s | 0.73s | 0.25s |
| particles | 0.79s | 0.55s | 2.93s | 1.00s | 1.07s |
| shapes | 0.62s | 0.42s | 1.70s | 0.67s | 0.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).
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.
| program | lines | compile |
|---|---|---|
| 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).