YJIT Benchmarks

Details for Benchmarks at 2023-05-15 19:08:43 GMT

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

Overall YJIT is 47.8% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 51.3% faster than CRuby!

Performance on Headline Benchmarks

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

Memory Usage on Headline Benchmarks

Select Platform
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 CRuby 3.3.0dev YJIT 3.3.0dev activerecord hexapdf liquid-c liquid-compile liquid-render mail psych-load railsbench ruby-lsp sequel geomean*
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on Other Benchmarks

Select Platform
0.0 0.5 1.0 1.5 2.0 2.5 No JIT YJIT binarytrees chunky_png erubi erubi_rails etanni fannkuchredux lee nbody optcarrot ruby-json rubykon
Speed of each Ruby implementation relative to the baseline CRuby measurement. Higher is better.

Memory Usage on Other Benchmarks

Select Platform
0.0 0.2 0.4 0.6 0.8 1.0 CRuby 3.3.0dev YJIT 3.3.0dev binarytrees chunky_png erubi erubi_rails etanni fannkuchredux lee nbody optcarrot ruby-json rubykon geomean*
Memory usage of each Ruby implementation relative to the baseline CRuby measurement. Lower is better.

Performance on MicroBenchmarks

Select Platform
0.0 2.0 4.0 6.0 8.0 10.0 No JIT YJIT 30k_ifelse 30k_methods cfunc_itself fib getivar keyword_args respond_to setivar setivar_object setivar_young str_concat throw
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

Benchmark Memory Usage Details

Select Platform
bench CRuby 3.3.0dev mem (MiB) YJIT 3.3.0dev mem (MiB) Inline Code Outlined Code YJIT Mem overhead
activerecord 54 60 1 1 10.7%
hexapdf 275 369 2 2 34.3%
liquid-c 40 44 1 1 9.9%
liquid-compile 38 41 1 1 7.5%
liquid-render 36 40 1 1 11.3%
mail 48 51 1 1 5.4%
psych-load 35 37 1 1 5.3%
railsbench 96 110 3 3 14.8%
ruby-lsp 94 133 5 5 41.9%
sequel 41 44 1 1 8.6%
binarytrees 29 30 1 1 1.4%
chunky_png 52 47 1 1 -9.9%
erubi 114 128 1 1 11.9%
erubi_rails 95 103 2 2 7.9%
etanni 153 158 1 1 2.7%
fannkuchredux 23 24 1 1 2.4%
lee 34 37 1 1 8.2%
nbody 23 24 1 1 2.2%
optcarrot 58 62 1 1 6.3%
ruby-json 25 25 1 1 1.5%
rubykon 59 58 1 1 -1.2%
30k_ifelse 65 102 6 5 56.1%
30k_methods 54 63 2 2 16.9%
cfunc_itself 23 24 1 1 1.7%
fib 23 24 1 1 1.6%
getivar 23 24 1 1 1.7%
keyword_args 23 24 1 1 1.7%
respond_to 23 24 1 1 1.7%
setivar 23 24 1 1 1.7%
setivar_object 23 24 1 1 1.7%
setivar_young 23 24 1 1 1.7%
str_concat 106 114 1 1 7.9%
throw 23 24 1 1 1.6%

Memory is shown in mebibytes (1024 * 1024 bytes.)

Older YJIT allocated an additional 256MiB for generated code. Current YJIT allocates executable memory on demand, so this overhead should no longer be present.

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.