Skip to content

Benchmarks

Benchmark results depend on Ruby, hardware, input distribution, backend, and table shape. The repository records commands, input conditions, measurements, and limitations in docs/perf-log.md.

Measured on 2026-11-22 with Ruby 4.0.9 on arm64 macOS, using 140,000 bytes of input and 50,000 emitted tokens. Each row reports the run with the median generated/runtime ratio out of three runs per engine.

EngineRuntime / handwrittenGenerated / handwrittenGenerated / runtime
Interpreter0.261x0.307x1.177x
YJIT0.717x0.763x1.064x
ZJIT0.259x0.274x1.060x

Start with auto and use the reproduction commands to measure the workload you plan to deploy.