YJIT Benchmarks

Details for Benchmarks at 2025-05-22 03:51:34 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.4% faster than CRuby 3.5.0dev
  • 4.8% faster than YJIT 3.3.6
On railsbench it is
  • 99.2% faster than CRuby 3.5.0dev
  • 5.9% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 25 minutes
aarch64 runtime: 3 hours, 44 minutes

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.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 83 5 81 50 154 50 163
chunky-png 5 31 5 32 50 15 50 21
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 421 50 589 50 599
liquid-compile 5 407 5 466 50 546 50 710
liquid-render 5 169 5 165 50 409 50 432
lobsters 5 20 5 19 50 10 50 10
mail 5 190 5 176 50 250 50 207
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 252 50 261
ruby-lsp 5 155 5 154 50 249 50 250
sequel 5 428 5 425 50 570 50 584
binarytrees 5 84 5 84 50 146 50 135
blurhash 5 82 5 86 50 127 50 145
erubi 5 119 5 141 50 98 50 139
etanni 5 90 5 98 50 53 50 69
fannkuchredux 5 52 5 58 50 98 50 106
fluentd 5 63 5 64 50 25 50 31
graphql 5 85 5 85 50 58 50 57
graphql-native 5 40 5 55 50 10 50 19
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 53 50 88 50 97
nbody 5 248 5 256 50 585 50 706
nqueens 5 120 5 126 50 75 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 185 50 620 50 720
protoboeuf-encode 5 178 5 206 50 324 50 789
rack 5 583 5 626 50 957 50 1063
ruby-json 5 84 5 84 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 51 50 163 50 166
tinygql 5 35 5 39 50 22 50 32
30k_ifelse 5 28 5 27 50 216 50 184
30k_methods 5 39 5 38 50 480 50 473
cfunc_itself 5 358 5 363 50 1147 50 1259
fib 5 127 5 138 50 902 50 931
getivar 5 213 5 334 50 2254 50 2419
keyword_args 5 104 5 111 50 1041 50 1242
loops-times 5 24 5 26 50 48 50 61
object-new 5 322 5 351 50 405 50 520
respond_to 5 134 5 133 50 3258 50 3894
ruby-xor 5 245 5 248 50 800 50 1314
setivar 5 361 5 598 50 3189 50 5090
setivar_object 5 354 5 445 50 671 50 749
setivar_young 5 368 5 445 50 703 50 752
str_concat 5 399 5 454 50 982 50 1159
throw 5 1269 5 1261 50 1723 50 1692

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT warms up fairly quickly, while some JITs may start slower as they do more advanced compilation.

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) 1521252 1356364 206 2590 0 0% 0 0 75.608216
chunky-png (click) 308162 285068 74 1322 1 0% 0 0 38.504774
erubi-rails (click) 1984158 1730248 262 3632 21 0% 0 0 100.137724
hexapdf (click) 1492958 1378098 594 15627 40 0% 0 0 450.095731
liquid-c (click) 514038 462682 114 2217 5 0% 0 0 60.834336
liquid-compile (click) 427819 388030 146 2695 2 0% 0 0 81.797033
liquid-render (click) 624076 548313 131 2933 8 0% 0 0 80.789842
lobsters (click) 8511091 7091935 3172 63573 120 0% 0 0 2174.406492
mail (click) 825410 815233 342 7227 40 0% 0 0 206.963209
psych-load (click) 296298 212358 61 825 3 0% 0 0 24.69985
railsbench (click) 3401488 3144395 1653 20185 56 0% 0 0 579.063123
rubocop (click) 5899937 4914273 2885 61754 113 0% 4 0 1813.335182
ruby-lsp (click) 859296 756822 305 5950 29 0% 0 0 165.116611
sequel (click) 482654 423588 11 114 0 0% 0 0 4.035666
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.54766
blurhash (click) 52289 51444 27 603 0 0% 0 0 18.252547
erubi (click) 243956 219642 5 125 0 0% 0 0 3.891131
etanni (click) 30806 32125 8 108 0 0% 0 0 3.531174
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.136154
fluentd (click) 395558 306902 7 115 0 0% 0 0 3.866399
graphql (click) 461043 399084 66 1035 0 0% 0 0 29.090642
graphql-native (click) 413021 355109 37 399 0 0% 0 0 11.318922
lee (click) 321923 296092 45 1012 0 0% 0 0 30.575808
matmul (click) 11125 4603 8 132 0 0% 0 0 4.221427
nbody (click) 13890 20235 6 238 0 0% 0 0 5.839396
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.317999
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 115.272876
protoboeuf (click) 170142 177773 12 2836 0 0% 0 0 75.620772
protoboeuf-encode (click) 243031 283791 14 1815 0 0% 0 0 46.926075
rack (click) 281595 250735 31 496 0 0% 0 0 12.997653
ruby-json (click) 24392 21840 8 204 0 0% 0 0 5.784008
rubyboy (click) 699726 631362 177 6963 40 0% 0 0 175.607416
rubykon (click) 146417 162602 137 2076 3 0% 0 0 57.647826
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.962475
tinygql (click) 288514 244014 58 971 5 0% 0 0 26.996227
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1968.432456
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 492.991112
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.478931
fib (click) 2659 2995 3 30 0 0% 0 0 1.095622
getivar (click) 3812 6802 3 78 0 0% 0 0 1.907466
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.759197
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.703821
object-new (click) 2406 2818 2 36 0 0% 0 0 1.129321
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.121663
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.713701
setivar (click) 2783 3726 3 46 0 0% 0 0 1.24884
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.387908
setivar_young (click) 4297 4867 4 63 0 0% 0 0 1.715636
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.486534
throw (click) 5953 4624 5 53 0 0% 0 0 1.786188

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.