Benchmarks

Oxigen's default build, JIT on, running the 10 programs in the repository's benchmark suite against CPython 3.14.6 (with its JIT on), Node.js 26.5.0 and Bun 1.3.14. The median speed-up over CPython was 18×.

Measured
2026-08-08
Machine
Apple Silicon Mac (macOS, arm64)
Oxigen
0.1.4
Faster than CPython
10 of 10
Times faster than CPython 3.14.6Fastest of 5 runs after 3 warm-ups. Longer is better.
  1. Nested loops, large65×
  2. Counting loop53×
  3. Nested loops41×
  4. Primes, serial21×
  5. Primes, parallel19×
  6. Collatz17×
  7. Struct methods7.3×
  8. Closures6.7×
  9. Arithmetic2.5×
  10. Recursive Fibonacci2.3×

All of it

Fastest run of each program, in milliseconds. Default is plain oxigen file.oxi: hot functions go native after about 50 calls. --jit compiles on the first call. --no-jit is the interpreter alone, and it's slower than CPython. The JIT is what makes the difference.

Fastest run in milliseconds (lower is better) on Apple Silicon Mac (macOS, arm64), 2026-08-08.
BenchmarkOxigen interpreter --no-jitOxigen defaultOxigen --jitCPython 3.14.6Node 26.5.0Bun 1.3.14Default vs CPython
Arithmeticinteger and float arithmetic in a hot loop11511283131773362.5×
Closurescalling closures that capture variables1693525335054156.7×
CollatzCollatz sequence lengths, branches and integer maths340941416791457217×
Recursive Fibonaccideep recursive function calls17871854742082382.3×
Counting loopa tight counting loop112789423631953×
Nested loopstwo nested counting loops51156204501341×
Nested loops, largenested loops over a larger range20461213785832865×
Primes, parallelprime counting split across cores with diverge/converge202121401––19×
Primes, serialprime counting on one core81411121122376––21×
Struct methodsmethod calls on struct instances2297555540180197.3×

How they were measured

scripts/bench.sh runs each example/bench_*.oxi next to its Python twin, plus the TypeScript versions under Bun and Node where there are any. Runs are interleaved, A then B then A, so every runtime sees the same thermal state on a laptop that throttles. Each number is the fastest run after warm-ups.

Click a label in the chart to read that program. The JIT itself is written up in JIT architecture.

Run them yourself

shell
git clone https://github.com/javanhut/OxigenLang.git
cd OxigenLang
cargo build --release -p oxigen
scripts/bench.sh