YJIT Benchmarks

Details for Benchmarks at 2023-10-26 06:08:15 GMT

YJIT metrics from the yjit-bench suite using Ruby 634e0ac140.

Overall YJIT is 63.2% faster than interpreted CRuby!
On Railsbench specifically, YJIT is 68.1% 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
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 1.6 1.8 CRuby 3.3.0dev YJIT 3.3.0dev activerecord chunky-png erubi-rails hexapdf liquid-c liquid-compile liquid-render lobsters 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 3.0 No JIT YJIT binarytrees erubi etanni fannkuchredux fluentd graphql graphql-native lee nbody optcarrot rack ruby-json rubykon tinygql
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
0.0 2.0 4.0 6.0 8.0 10.0 12.0 14.0 16.0 18.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
0.0 0.2 0.4 0.6 0.8 1.0 1.2 1.4 CRuby 3.3.0dev YJIT 3.3.0dev 30k_ifelse 30k_methods cfunc_itself fib getivar keyword_args respond_to setivar setivar_object setivar_young str_concat throw geomean*
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 48 54 1 1 11.5%
chunky-png 59 52 1 1 -12.2%
erubi-rails 88 97 2 2 10.6%
hexapdf 151 289 2 2 91.8%
liquid-c 36 41 1 1 11.6%
liquid-compile 33 38 1 1 15.1%
liquid-render 34 38 1 1 12.8%
lobsters 275 330 8 7 19.9%
mail 50 56 1 1 10.8%
psych-load 34 37 1 1 7.6%
railsbench 89 105 3 3 17.1%
ruby-lsp 94 132 5 5 39.1%
sequel 37 40 1 1 9.6%
binarytrees 25 26 1 1 4.5%
erubi 29 31 1 1 7.4%
etanni 23 23 1 1 2.2%
fannkuchredux 20 20 1 1 1.9%
fluentd 606 657 1 1 8.4%
graphql 39 42 1 1 7.9%
graphql-native 35 39 1 1 11.9%
lee 34 36 1 1 7.2%
nbody 20 20 1 1 1.7%
optcarrot 60 68 1 1 12.2%
rack 29 31 1 1 8.2%
ruby-json 21 21 1 1 2.2%
rubykon 47 48 1 1 3.3%
tinygql 27 30 1 1 8.1%
30k_ifelse 63 93 5 5 46.1%
30k_methods 51 59 2 2 15.3%
cfunc_itself 20 20 1 1 1.6%
fib 20 20 1 1 1.6%
getivar 20 20 1 1 1.6%
keyword_args 20 20 1 1 1.6%
respond_to 20 20 1 1 1.6%
setivar 20 20 1 1 1.6%
setivar_object 20 20 1 1 1.6%
setivar_young 20 20 1 1 1.7%
str_concat 46 61 1 1 33.5%
throw 20 20 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.