YJIT Benchmarks

Details for Benchmarks at 2025-05-31 03:50:19 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.8% faster than CRuby 3.5.0dev
  • 6.0% faster than YJIT 3.3.6
On railsbench it is
  • 101.4% faster than CRuby 3.5.0dev
  • 5.8% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 26 minutes
aarch64 runtime: 3 hours, 47 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 84 50 155 50 174
chunky-png 5 31 5 32 50 15 50 24
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 421 50 586 50 596
liquid-compile 5 407 5 463 50 541 50 698
liquid-render 5 169 5 170 50 409 50 433
lobsters 5 20 5 19 50 10 50 10
mail 5 191 5 179 50 237 50 211
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 155 50 251 50 263
ruby-lsp 5 161 5 156 50 245 50 264
sequel 5 426 5 417 50 600 50 585
binarytrees 5 84 5 81 50 146 50 134
blurhash 5 82 5 88 50 127 50 145
erubi 5 120 5 142 50 98 50 148
etanni 5 90 5 98 50 53 50 70
fannkuchredux 5 52 5 57 50 97 50 106
fluentd 5 63 5 58 50 25 50 26
graphql 5 85 5 83 50 58 50 56
graphql-native 5 40 5 58 50 10 50 16
lee 5 22 5 24 50 10 50 10
matmul 5 51 5 53 50 88 50 97
nbody 5 249 5 257 50 584 50 683
nqueens 5 120 5 127 50 75 50 551
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 186 50 621 50 759
protoboeuf-encode 5 178 5 206 50 327 50 789
rack 5 576 5 620 50 959 50 1070
ruby-json 5 84 5 82 50 50 50 49
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 157
tinygql 5 36 5 39 50 22 50 33
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 38 5 38 50 481 50 474
cfunc_itself 5 359 5 362 50 1147 50 1258
fib 5 127 5 143 50 902 50 931
getivar 5 213 5 288 50 2251 50 2376
keyword_args 5 104 5 108 50 1041 50 1243
loops-times 5 24 5 26 50 48 50 62
object-new 5 322 5 355 50 405 50 572
respond_to 5 133 5 130 50 3257 50 3896
ruby-xor 5 245 5 234 50 799 50 1295
setivar 5 361 5 610 50 3180 50 5094
setivar_object 5 355 5 447 50 671 50 743
setivar_young 5 366 5 447 50 702 50 756
str_concat 5 399 5 445 50 982 50 1124
throw 5 1273 5 1274 50 1718 50 1707

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) 1506284 1221109 206 2590 0 0% 0 0 75.920165
chunky-png (click) 321056 297361 74 1322 1 0% 0 0 38.854248
erubi-rails (click) 1981368 1730175 263 3641 21 0% 0 0 100.722784
hexapdf (click) 1501719 1287963 593 15612 39 0% 0 0 456.048599
liquid-c (click) 530926 477155 114 2217 5 0% 0 0 61.958095
liquid-compile (click) 446278 406368 146 2746 2 0% 0 0 83.143966
liquid-render (click) 616801 517370 131 2933 8 0% 0 0 81.420574
lobsters (click) 8521371 7102784 3171 63660 118 0% 0 0 2153.117331
mail (click) 798633 791441 342 7232 40 0% 0 0 211.482581
psych-load (click) 296798 253673 61 825 3 0% 0 0 24.978094
railsbench (click) 3365300 2948520 1653 20238 56 0% 0 0 584.379485
rubocop (click) 5917565 5140942 2885 61690 113 0% 4 0 1799.831712
ruby-lsp (click) 891117 844495 305 5955 29 0% 0 0 164.662244
sequel (click) 490861 456263 11 114 0 0% 0 0 3.768729
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.64182
blurhash (click) 52289 51444 27 603 0 0% 0 0 18.268659
erubi (click) 269284 226811 5 125 0 0% 0 0 3.902343
etanni (click) 30806 32125 8 108 0 0% 0 0 3.474236
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.145246
fluentd (click) 423517 339245 7 115 0 0% 0 0 3.882536
graphql (click) 445693 385831 66 1035 0 0% 0 0 28.855776
graphql-native (click) 400098 343973 37 399 0 0% 0 0 11.055961
lee (click) 297260 192105 45 1012 0 0% 0 0 30.383253
matmul (click) 11125 4603 8 132 0 0% 0 0 4.238781
nbody (click) 13890 20235 6 238 0 0% 0 0 5.877751
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.399057
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 114.695716
protoboeuf (click) 170142 177773 12 2836 0 0% 0 0 75.804342
protoboeuf-encode (click) 243031 283791 14 1815 0 0% 0 0 47.08101
rack (click) 256572 203774 31 496 0 0% 0 0 13.441752
ruby-json (click) 24673 22156 8 204 0 0% 0 0 5.826777
rubyboy (click) 702309 658407 177 6963 40 0% 0 0 177.11893
rubykon (click) 145853 169867 137 2066 3 0% 0 0 57.122813
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.090056
tinygql (click) 288199 267860 58 977 5 0% 0 0 27.626061
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1980.337378
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 492.342464
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.437813
fib (click) 2659 2995 3 30 0 0% 0 0 1.07405
getivar (click) 3812 6802 3 78 0 0% 0 0 1.905277
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.739509
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.728495
object-new (click) 2406 2818 2 36 0 0% 0 0 1.152629
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.102407
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.714663
setivar (click) 2783 3726 3 46 0 0% 0 0 1.231279
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.404731
setivar_young (click) 4297 4867 4 63 0 0% 0 0 1.721058
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.474356
throw (click) 5953 4624 5 53 0 0% 0 0 1.83115

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.