YJIT Benchmarks

Details for Benchmarks at 2024-08-08 00:18:01 UTC

YJIT metrics from the yjit-bench suite using Ruby 8d39939107

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.2% faster than CRuby 3.4.0dev
  • 2.5% faster than YJIT 3.3.4
On railsbench it is
  • 77.5% faster than CRuby 3.4.0dev
  • 1.4% faster than YJIT 3.3.4

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.3.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 51 10 47 10 109 10 120
chunky-png 10 18 10 16 10 36 10 37
erubi-rails 10 10 10 10 10 21 10 19
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 339 10 478 10 497
liquid-compile 10 338 10 337 10 480 10 493
liquid-render 10 140 10 133 10 353 10 356
lobsters 10 14 10 13 10 24 10 23
mail 10 161 10 152 10 227 10 224
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 137 10 131 10 229 10 238
ruby-lsp 10 118 10 122 10 209 10 208
sequel 10 312 10 309 10 425 10 417
binarytrees 10 51 10 50 10 118 10 118
blurhash 10 62 10 58 10 120 10 143
erubi 10 79 10 86 10 96 10 110
etanni 10 59 10 58 10 69 10 68
fannkuchredux 10 10 10 10 10 18 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 35 10 22 10 40 10 38
lee 10 11 10 11 10 19 10 20
matmul 10 10 10 10 10 15 10 16
nbody 10 208 10 196 10 407 10 473
nqueens 10 117 10 109 10 117 10 462
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 180 10 180 10 603 10 694
protoboeuf-encode 10 123 10 134 10 276 10 443
rack 10 460 10 480 10 821 10 899
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 31 10 32
tinygql 10 24 10 23 10 51 10 51
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 255 10 256 10 1105 10 1212
fib 10 105 10 96 10 616 10 618
getivar 10 256 10 208 10 1274 10 1714
keyword_args 10 92 10 88 10 720 10 947
object-new 10 228 10 215 10 300 10 277
respond_to 10 94 10 91 10 1729 10 2094
ruby-xor 10 31 10 28 10 99 10 132
setivar 10 420 10 362 10 2353 10 4825
setivar_object 10 266 10 241 10 653 10 695
setivar_young 10 266 10 241 10 650 10 691
str_concat 10 329 10 308 10 592 10 537
throw 10 988 10 885 10 1275 10 1165

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) 1362628 1207012 214 2169 0 0% 0 0 80.328698
chunky-png (click) 281627 275740 83 1054 1 0% 0 0 35.730965
erubi-rails (click) 1652086 1349382 274 2932 6 0% 0 0 100.295574
hexapdf (click) 1266675 1053938 505 11812 39 0% 0 0 409.503159
liquid-c (click) 472119 384475 119 1770 5 0% 0 0 57.617796
liquid-compile (click) 384836 311221 151 2082 2 0% 0 0 73.29006
liquid-render (click) 560824 465753 136 2325 8 0% 0 0 77.059217
lobsters (click) 7533660 6332909 3082 49744 81 0% 0 0 2228.338377
mail (click) 725497 670302 347 5553 14 0% 0 0 187.894621
psych-load (click) 258895 232259 61 594 3 0% 0 0 21.285899
railsbench (click) 2902149 2499646 1636 15971 57 0% 0 0 585.372371
rubocop (click) 5443672 4621897 2892 50952 110 0% 4 0 1918.116999
ruby-lsp (click) 801665 669714 309 4745 24 0% 0 0 159.549919
sequel (click) 437386 384860 16 115 0 0% 0 0 4.855425
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.968479
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.6536
erubi (click) 221085 187890 10 112 0 0% 0 0 4.262864
etanni (click) 28405 26890 11 91 0 0% 0 0 3.488019
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.689641
fluentd (click) 329391 282714 4 28 0 0% 0 0 1.402297
graphql (click) 398730 345375 66 650 0 0% 0 0 23.172808
graphql-native (click) 360535 295588 41 273 0 0% 0 0 10.327454
lee (click) 257262 226341 34 531 0 0% 0 0 19.301755
matmul (click) 7957 8968 7 82 0 0% 0 0 3.197633
nbody (click) 15014 19017 10 191 0 0% 0 0 6.120916
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.329664
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 118.280266
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.620614
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.261771
rack (click) 220838 200301 37 445 0 0% 0 0 14.52054
ruby-json (click) 19008 16632 7 164 0 0% 0 0 5.407293
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.156373
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.057771
tinygql (click) 260406 227457 58 735 5 0% 0 0 24.074859
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1909.473498
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 532.455103
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.322544
fib (click) 4609 4792 7 45 0 0% 0 0 1.869133
getivar (click) 5575 6644 7 70 0 0% 0 0 2.329715
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.64407
object-new (click) 4039 4024 6 41 0 0% 0 0 2.025491
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.853773
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.96534
setivar (click) 4726 5320 7 50 0 0% 0 0 1.908726
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.984976
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.220305
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.243418
throw (click) 7538 6222 9 65 0 0% 0 0 2.695165

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.