YJIT Benchmarks

Details for Benchmarks at 2024-01-25 06:08:17 UTC

YJIT metrics from the yjit-bench suite using Ruby 2b9719ea30

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 67.6% faster than CRuby 3.4.0dev
On railsbench it is
  • 72.1% faster than CRuby 3.4.0dev

Performance on Headline Benchmarks

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

Memory Usage on Headline Benchmarks

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

Performance on Other Benchmarks

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

Memory Usage on Other Benchmarks

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

Performance on MicroBenchmarks

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

Memory Usage on MicroBenchmarks

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

Want Raw Graphs and CSV?

Benchmarks Speed Details

Benchmark Memory Usage Details

Number of Iterations and Warmups Tested

bench CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 30 480 30 480
chunky-png 30 31 30 31
erubi-rails 30 15 30 15
hexapdf 30 15 30 15
liquid-c 30 347 30 347
liquid-compile 30 340 30 340
liquid-render 30 251 30 251
lobsters 30 23 30 23
mail 30 163 30 163
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 178 30 178
ruby-lsp 30 177 30 177
sequel 30 298 30 298
binarytrees 30 83 30 83
blurhash 30 94 30 94
erubi 30 76 30 76
etanni 30 51 30 51
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 32 30 32
lee 30 19 30 19
matmul 30 15 30 15
nbody 30 265 30 265
nqueens 30 271 30 271
optcarrot 30 15 30 15
rack 30 180 30 180
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
tinygql 30 40 30 40
30k_ifelse 30 55 30 55
30k_methods 30 23 30 23
cfunc_itself 30 827 30 827
fib 30 416 30 416
getivar 30 941 30 941
keyword_args 30 533 30 533
respond_to 30 1438 30 1438
setivar 30 1668 30 1668
setivar_object 30 331 30 331
setivar_young 30 365 30 365
str_concat 30 433 30 433
throw 30 815 30 815

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT and MJIT 3.0 both warm up quite quickly, while MJIT in 3.1 often slows down for a time as it compiles, after an unpredictable delay.

Benchmark YJIT Stats

Hover your cursor over the benchmark names for descriptions of each benchmark.

bench Exit Report Inline Outlined Comp iSeqs Comp Blocks Inval Inval Ratio Bind Alloc Bind Set Const Bumps Compile Time MS
activerecord (click) 750792 625771 48 526 3 0% 0 0 0 15.562715
chunky-png (click) 320693 297608 87 1106 1 0% 0 0 0 32.486912
erubi-rails (click) 1616017 1371589 287 2920 1 0% 0 0 0 82.44315
hexapdf (click) 1359315 1131978 596 12271 36 0% 0 0 0 358.64879
liquid-c (click) 506477 479830 119 1761 5 0% 0 0 0 47.786232
liquid-compile (click) 427588 376492 151 2046 2 0% 0 0 0 61.987691
liquid-render (click) 603713 519087 143 2267 8 0% 0 0 0 62.552125
lobsters (click) 7524328 6499608 3181 49501 73 0% 0 0 0 1649.917111
mail (click) 701869 621151 345 4827 12 0% 0 0 0 139.719733
psych-load (click) 283353 248927 65 651 3 0% 0 0 0 20.245056
railsbench (click) 2426289 2159327 1366 12562 16 0% 0 0 0 365.690048
rubocop (click) 4952221 4312362 2901 44282 99 0% 4 0 0 1322.26022
ruby-lsp (click) 619711 576945 159 2757 14 0% 0 0 0 76.402918
sequel (click) 471907 430356 16 119 0 0% 0 0 0 4.532375
binarytrees (click) 9291 8120 11 75 0 0% 0 0 0 2.941329
blurhash (click) 55111 50797 32 478 0 0% 0 0 0 15.849932
erubi (click) 256479 233531 10 114 0 0% 0 0 0 3.906994
etanni (click) 31947 30258 12 98 0 0% 0 0 0 3.336492
fannkuchredux (click) 24971 26731 9 259 0 0% 0 0 0 7.813528
fluentd (click) 363123 320415 11 111 0 0% 0 0 0 3.565295
graphql (click) 426538 393051 70 668 0 0% 0 0 0 20.375869
graphql-native (click) 393057 354076 42 273 0 0% 0 0 0 9.016641
lee (click) 301055 242795 49 734 0 0% 0 0 0 23.15332
matmul (click) 12823 4423 12 123 0 0% 0 0 0 4.208707
nbody (click) 18045 16846 11 187 0 0% 0 0 0 5.465456
nqueens (click) 21345 24174 10 229 0 0% 0 0 0 6.961043
optcarrot (click) 313426 304977 194 4318 34 0% 0 0 0 102.585976
rack (click) 256995 246734 31 326 0 0% 0 0 0 9.441764
ruby-json (click) 28225 25685 12 202 0 0% 0 0 0 6.0882
rubykon (click) 132023 96554 145 1504 3 0% 0 0 0 41.591633
sudoku (click) 46825 38098 11 507 0 0% 0 0 0 15.132101
tinygql (click) 294653 268803 63 792 5 0% 0 0 0 22.441695
30k_ifelse (click) 4909438 4374645 9264 50815 0 0% 0 0 0 1395.783023
30k_methods (click) 1850265 1594310 5782 19371 0 0% 0 0 0 492.344803
cfunc_itself (click) 7728 6775 9 72 0 0% 0 0 0 2.439303
fib (click) 5044 5012 8 49 0 0% 0 0 0 1.908807
getivar (click) 6179 6402 8 74 0 0% 0 0 0 2.197822
keyword_args (click) 8341 6984 10 74 0 0% 0 0 0 2.647978
respond_to (click) 8471 8395 9 87 0 0% 0 0 0 2.842931
setivar (click) 5330 4983 8 54 0 0% 0 0 0 1.935698
setivar_object (click) 5668 5003 8 54 0 0% 0 0 0 1.982699
setivar_young (click) 6435 5792 9 62 0 0% 0 0 0 2.231653
str_concat (click) 7993 7737 11 87 0 0% 0 0 0 2.854078
throw (click) 7723 6444 10 69 0 0% 0 0 0 2.344931

YJIT stats correspond to the YJIT stats exit report.

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.