Skip to content
This repository was archived by the owner on Nov 22, 2026. It is now read-only.

Releases

mojo-bench v0.1.1

Choose a tag to compare

@amarbarosys amarbarosys released this 08 Nov 23:47

mojo-bench v0.1.1

Released: 2026-11-08 · Commit: 12f31fc · Previous: v0.1.0

What it does

Benchmark harness for Mojo that reports statistics, not one number: warmup, auto iteration count,
median, MAD, min, p95, seeded 95% bootstrap CI, outlier count, and compare() that says
"no difference" when the CIs overlap. 211 lines, no dependency beyond the stdlib. Every statistic is
checked bit for bit against a Python reference (tools/oracle.py) on 3117 seeded cases.

A Mojo library for Linux (Mojo 1.2). Use it from source with mojo run -I path/to/mojo-bench/src app.mojo.

Highlights

  • Packaging only: the conda recipe pins mojo-compiler to the minor the package was built with (<1.3.0a0), so it cannot be installed on a Mojo it does not load on.

Changes

Changed

  • recipe.yaml: mojo-compiler run dependency pinned to the build's minor (<1.3.0a0).

Verified

Check Result
pkg-conda dry run on the version commit (H1-H3,H6) PASS: mojo-bench-0.1.1-hb0f4dca_0.conda

Known limits

  • Packages are built on one Mojo minor only; see the package protocol.

Upgrade / run

None: no API change.

Commits

  • 12f31fc build: bump version to 0.1.1
  • 213c4a9 build: recipe pins mojo-compiler to the build's minor
  • 2f6d29e docs: CHANGELOG names no home path
  • ca17339 chore(license): fill Apache-2.0 copyright notice

mojo-bench v0.1.0

Choose a tag to compare

@amarbarosys amarbarosys released this 04 Nov 14:18

mojo-bench v0.1.0

Released: 2026-11-04 · Commit: 6b3f6fb · Previous: first release

What it does

Benchmark harness for Mojo that reports statistics, not one number: warmup, auto iteration count,
median, MAD, min, p95, seeded 95% bootstrap CI, outlier count, and compare() that says
"no difference" when the CIs overlap. 211 lines, no dependency beyond the stdlib. Every statistic is
checked bit for bit against a Python reference (tools/oracle.py) on 3117 seeded cases.

A Mojo library for Linux (Mojo 1.2). Use it from source with mojo run -I path/to/mojo-bench/src app.mojo.

Highlights

  • One call gives median, MAD, min, p95, a 95% CI and an outlier count, not one number.
  • compare() says "no difference" when the CIs overlap, so a noisy 3% never reads as a win.
  • Statistics match a Python reference bit for bit; the bootstrap runs about 115x faster than that reference.

Changes

Added

  • bench, bench2 (interleaved samples), compare, stats, table, Result.json().

Verified

Check Result
scripts/check.sh: 3117 seeded cases (2514 stats, 603 compare) vs tools/oracle.py byte-identical, PASS
Negative control: tools/oracle.py --broken through the same diff differs, as it must
2x slower function (tests/behavior.mojo) reads 2.00x, CI about 1.99 to 2.01, "b faster"
Two copies of one function reads 1.00x, "no difference"
README and docs/api.md code blocks vs examples/*.mojo equal, compiled and run; drifted README fails the gate
scripts/bench.sh, stats 20x(n=200, B=1000) Mojo 14 to 15 ms, Python 1662 to 1721 ms, peak RSS 11 vs 12 MB
Memory every gate command under MemoryMax=4G; none hit the cap

Known limits

  • CPU timing only: no GPU sync, no hardware counters.
  • stats and compare need a non-empty vector.
  • The CI workflow (.github/workflows/ci.yml) has not run on GitHub: there is no remote. UNVERIFIED there.
  • Statistics are of the median; there is no mean or stddev.

Upgrade / run

mojo run -I path/to/mojo-bench/src app.mojo

Commits

  • 6b3f6fb docs: README, api, design, perf; doc blocks are compiled examples
  • 50c0e73 chore: license, notice, CI workflow
  • 9686f8e feat: benchmark harness with seeded bootstrap statistics and compare