YJIT Benchmarks

Details for Benchmarks at 2023-11-01 06:08:17 GMT

YJIT metrics from the yjit-bench suite using Ruby a1e24ab484.

Overall YJIT is 62.5% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 68.5% faster than CRuby!

Performance on Headline Benchmarks

Select Platform
0.0 0.5 1.0 1.5 2.0 No JIT YJIT activerecord chunky-png erubi-rails hexapdf liquid-c liquid-compile liquid-render lobsters mail psych-load railsbench ruby-lsp sequel
Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Headline Benchmarks

Select Platform
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Select Platform
Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Select Platform
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Select Platform
Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on MicroBenchmarks

Select Platform
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Want Raw Graphs and CSV?

Benchmarks Speed Details

Select Platform
bench No JIT (ms) No JIT RSD YJIT (ms) YJIT RSD YJIT spd YJIT spd RSD % in YJIT
activerecord 82.0 1.88% 41.2 4.11% 1.99x 4.52% 99.96%
chunky-png 1040.3 0.25% 618.0 0.46% 1.68x 0.53% 100.00%
erubi-rails 2630.1 0.62% 1397.1 1.15% 1.88x 1.31% 99.93%
hexapdf 3436.3 0.90% 2043.1 1.66% 1.68x 1.89% 93.94%
liquid-c 80.8 0.52% 56.1 0.77% 1.44x 0.93% 99.74%
liquid-compile 82.6 3.22% 57.7 4.53% 1.43x 5.56% 99.95%
liquid-render 195.2 0.37% 82.6 0.52% 2.36x 0.64% 99.86%
lobsters 1260.3 1.67% 844.7 3.08% 1.49x 3.50% 99.72%
mail 174.2 0.25% 121.7 0.34% 1.43x 0.42% 99.90%
psych-load 2683.2 0.08% 1866.6 0.11% 1.44x 0.14% 100.00%
railsbench 2773.4 0.50% 1645.7 1.01% 1.69x 1.13% 99.55%
ruby-lsp 78.9 3.03% 50.9 7.10% 1.55x 7.72% 92.83%
sequel 92.3 1.19% 69.7 1.85% 1.33x 2.20% 99.90%
binarytrees 484.4 1.09% 237.8 2.22% 2.04x 2.47% 100.00%
erubi 320.1 0.13% 255.3 0.13% 1.25x 0.18% 99.98%
etanni 431.5 0.08% 380.5 0.09% 1.13x 0.12% 99.98%
fannkuchredux 2267.0 0.08% 774.9 0.06% 2.93x 0.10% 90.92%
fluentd 2475.7 0.75% 2266.3 0.78% 1.09x 1.08% 99.99%
graphql 4140.5 0.03% 3465.3 0.03% 1.19x 0.04% 99.75%
graphql-native 542.0 0.11% 482.3 0.10% 1.12x 0.15% 99.97%
lee 1379.1 1.06% 972.4 1.54% 1.42x 1.87% 99.98%
nbody 124.0 0.06% 71.6 0.05% 1.73x 0.07% 99.95%
optcarrot 6279.9 0.65% 2019.3 0.67% 3.11x 0.93% 99.50%
rack 131.9 0.88% 106.2 1.25% 1.24x 1.53% 99.71%
ruby-json 4008.9 0.04% 3406.2 0.08% 1.18x 0.09% 99.99%
rubykon 13455.9 1.02% 6666.0 2.05% 2.02x 2.28% 99.95%
tinygql 871.5 0.10% 480.9 0.15% 1.81x 0.17% 99.99%
30k_ifelse 2398.2 0.06% 357.5 0.07% 6.71x 0.10% 99.99%
30k_methods 6579.7 0.02% 827.4 0.01% 7.95x 0.02% 99.99%
cfunc_itself 110.3 0.06% 26.5 0.03% 4.16x 0.07% 99.30%
fib 251.6 0.13% 47.7 0.37% 5.27x 0.40% 100.00%
getivar 128.3 0.08% 21.3 1.84% 6.02x 1.84% 97.87%
keyword_args 300.7 0.05% 40.8 0.17% 7.38x 0.17% 99.55%
respond_to 288.7 0.84% 16.3 0.40% 17.71x 0.93% 99.68%
setivar 78.2 0.11% 12.0 0.07% 6.52x 0.13% 98.74%
setivar_object 103.5 0.28% 42.1 0.02% 2.46x 0.28% 95.70%
setivar_young 103.3 0.44% 43.0 1.60% 2.40x 1.66% 95.61%
str_concat 93.7 0.75% 42.6 1.73% 2.20x 1.89% 99.97%
throw 30.1 0.28% 24.1 0.41% 1.25x 0.50% 99.99%

RSD is relative standard deviation - the standard deviation divided by the mean, expressed as a percentage.
% in YJIT is the percentage of instructions that complete in YJIT rather than exiting to the non-JITted interpreter. YJIT performs better when this is higher.
Speedup is relative to interpreted CRuby. So an "MJIT speedup" of 1.21x means MJIT runs at 1.21 times the iters/second of CRuby with JIT disabled.

You can find our benchmark code in the yjit-bench Github repo.
Our benchmark-runner and reporting code is in the yjit-metrics Github repo.

Tested Ruby version for YJIT and No-JIT: ruby 3.3.0dev (2023-11-01T02:29:56Z :detached: a1e24ab484) +YJIT [x86_64-linux]

Benchmark Memory Usage Details

Select Platform

Number of Iterations and Warmups Tested

Benchmark YJIT Stats

Note: currently, all stats are collected on x86_64, not ARM.

Raw JSON data files

All graphs and table data in this page comes from processing these data files, which come from benchmark runs.