Benchmarks
Benchmarks compare native Ax output with common baselines.
The benchmark suite is a regression harness for code generation and runtime overhead. It includes equivalent recursive, loop-heavy, string-search, path-normalization, URL-processing, CLI-argument, JSON-query, and simple HTTP backend programs for Ax, C, Rust, Python, and JavaScript.
Run
./benchmarks/run.sh
Every command is wrapped by benchmarks/expect-exit.sh, so Ax and each baseline must produce the same expected score before it is timed. The default run uses 5 warmups and 20 measured runs, and writes JSON plus Markdown reports to .ax-out/benchmarks/.
Recommended Tool
brew install hyperfine
./benchmarks/run.sh
Workloads
fib: recursive integer function calls.mix: mutablewhileloop integer arithmetic with modulo.text: string length, prefix/suffix, and substring search loops.path: lexical path normalization and basename loops.url: URL parse, query lookup, and percent encode/decode loops.cli: command-line flag and option lookup loops.json: JSON compaction, validation, nested query, kind checks, and array lookup loops.web: simple HTTP backend route handling for/healthand/ping.
Interpreting Results
Use benchmark results to catch regressions and compare implementation strategies. Do not treat one microbenchmark as a complete language ranking.