YJIT Benchmarks

Details for Benchmarks at 2024-04-19 19:08:14 UTC

YJIT metrics from the yjit-bench suite using Ruby cb711df36f

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.9% faster than CRuby 3.4.0dev
On railsbench it is
  • 80.4% 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 514 30 514
chunky-png 30 32 30 32
erubi-rails 30 19 30 19
hexapdf 30 15 30 15
liquid-c 30 341 30 341
liquid-compile 30 356 30 356
liquid-render 30 251 30 251
lobsters 30 23 30 23
mail 30 159 30 159
psych-load 30 15 30 15
railsbench 30 15 30 15
rubocop 30 182 30 182
ruby-lsp 30 176 30 176
sequel 30 286 30 286
binarytrees 30 85 30 85
blurhash 30 102 30 102
erubi 30 75 30 75
etanni 30 24 30 24
fannkuchredux 30 24 30 24
fluentd 30 15 30 15
graphql 30 15 30 15
graphql-native 30 33 30 33
lee 30 20 30 20
matmul 30 16 30 16
nbody 30 319 30 319
nqueens 30 323 30 323
optcarrot 30 15 30 15
protoboeuf 30 407 30 407
rack 30 182 30 182
ruby-json 30 15 30 15
rubykon 30 15 30 15
sudoku 30 26 30 26
tinygql 30 41 30 41
30k_ifelse 30 55 30 55
30k_methods 30 24 30 24
cfunc_itself 30 827 30 827
fib 30 418 30 418
getivar 30 1013 30 1013
keyword_args 30 646 30 646
respond_to 30 1462 30 1462
ruby-xor 30 111 30 111
setivar 30 2546 30 2546
setivar_object 30 399 30 399
setivar_young 30 406 30 406
str_concat 30 421 30 421
throw 30 779 30 779

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) 886193 770340 49 528 0 0% 0 0 15.69035
chunky-png (click) 337053 281985 87 1094 1 0% 0 0 32.17931
erubi-rails (click) 1709152 1431438 277 3004 6 0% 0 0 82.910509
hexapdf (click) 1416647 1231789 596 12692 38 0% 0 0 367.106293
liquid-c (click) 522579 453885 119 1757 5 0% 0 0 47.460383
liquid-compile (click) 445463 387626 151 2070 2 0% 0 0 63.00508
liquid-render (click) 622332 555591 136 2292 8 0% 0 0 61.980758
lobsters (click) 7868954 6614108 3212 51204 73 0% 0 0 1706.495201
mail (click) 730565 608610 346 4865 14 0% 0 0 141.018468
psych-load (click) 301118 244545 65 656 3 0% 0 0 20.27692
railsbench (click) 2997036 2562801 1634 15938 54 0% 0 0 452.639968
rubocop (click) 5368481 4562062 2901 48242 109 0% 4 0 1430.885027
ruby-lsp (click) 630782 554588 159 2794 14 0% 0 0 75.915727
sequel (click) 495497 418733 16 116 0 0% 0 0 4.12411
binarytrees (click) 9384 7556 11 75 0 0% 0 0 3.008944
blurhash (click) 51756 46977 32 460 0 0% 0 0 15.641069
erubi (click) 270262 237443 10 112 0 0% 0 0 3.863995
etanni (click) 29895 26052 11 91 0 0% 0 0 2.974166
fannkuchredux (click) 24443 9175 9 257 0 0% 0 0 8.24965
fluentd (click) 387439 327128 11 111 0 0% 0 0 3.633309
graphql (click) 440378 370408 70 685 0 0% 0 0 20.092966
graphql-native (click) 407894 342392 42 278 0 0% 0 0 9.137976
lee (click) 316265 260791 49 737 0 0% 0 0 22.950649
matmul (click) 12555 12107 12 126 0 0% 0 0 4.261644
nbody (click) 15072 7506 11 185 0 0% 0 0 5.121123
nqueens (click) 23358 17741 10 260 0 0% 0 0 8.239464
optcarrot (click) 313653 276483 192 4326 34 0% 0 0 103.259175
protoboeuf (click) 153148 132196 17 1378 0 0% 0 0 41.87371
rack (click) 272129 234033 31 323 0 0% 0 0 9.191257
ruby-json (click) 33192 28025 12 196 0 0% 0 0 5.790909
rubykon (click) 133835 122786 143 1503 3 0% 0 0 41.953845
sudoku (click) 46784 53075 11 507 0 0% 0 0 15.309302
tinygql (click) 313143 257403 63 787 5 0% 0 0 22.917151
30k_ifelse (click) 5222589 4374204 9264 50813 0 0% 0 0 1462.069755
30k_methods (click) 2019606 1594020 5782 19369 0 0% 0 0 520.872263
cfunc_itself (click) 7581 5778 9 70 0 0% 0 0 2.711591
fib (click) 5009 4601 8 49 0 0% 0 0 2.26011
getivar (click) 6094 5991 8 74 0 0% 0 0 2.55005
keyword_args (click) 8464 6470 10 72 0 0% 0 0 2.991726
respond_to (click) 8333 7728 9 85 0 0% 0 0 3.103226
ruby-xor (click) 8062 6902 9 87 0 0% 0 0 2.809649
setivar (click) 5185 4572 8 54 0 0% 0 0 2.220769
setivar_object (click) 5553 4592 8 54 0 0% 0 0 2.20674
setivar_young (click) 6276 5242 9 62 0 0% 0 0 2.436104
str_concat (click) 7876 7217 11 85 0 0% 0 0 2.887998
throw (click) 7938 6033 10 69 0 0% 0 0 2.456065

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.