YJIT Benchmarks

Details for Benchmarks at 2025-03-08 03:43:35 UTC

YJIT metrics from the yjit-bench suite using Ruby 98790faae3.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.6% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
On railsbench it is
  • 98.1% faster than CRuby 3.5.0dev
  • 3.6% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 43 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 83 50 157 50 165
chunky-png 5 32 5 35 50 16 50 33
erubi-rails 5 16 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 426 50 593 50 623
liquid-compile 5 408 5 434 50 539 50 595
liquid-render 5 169 5 174 50 404 50 441
lobsters 5 20 5 20 50 10 50 10
mail 5 196 5 195 50 251 50 247
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 160 50 253 50 267
ruby-lsp 5 158 5 162 50 247 50 268
sequel 5 433 5 426 50 573 50 566
binarytrees 5 84 5 85 50 149 50 142
blurhash 5 82 5 88 50 127 50 145
erubi 5 125 5 145 50 99 50 148
etanni 5 90 5 100 50 54 50 72
fannkuchredux 5 52 5 58 50 99 50 105
fluentd 5 63 5 65 50 24 50 32
graphql 5 84 5 85 50 57 50 60
graphql-native 5 40 5 52 50 10 50 15
lee 5 23 5 23 50 10 50 10
matmul 5 50 5 53 50 85 50 90
nbody 5 248 5 283 50 578 50 677
nqueens 5 120 5 127 50 75 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 190 50 620 50 739
protoboeuf-encode 5 180 5 210 50 328 50 831
rack 5 579 5 631 50 952 50 1067
ruby-json 5 84 5 84 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 51 50 164 50 160
tinygql 5 35 5 39 50 23 50 30
30k_ifelse 5 28 5 28 50 216 50 207
30k_methods 5 38 5 38 50 482 50 475
cfunc_itself 5 346 5 352 50 1147 50 1258
fib 5 127 5 147 50 910 50 933
getivar 5 207 5 316 50 2238 50 2755
keyword_args 5 107 5 110 50 1042 50 1244
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 326 50 405 50 382
respond_to 5 133 5 138 50 3258 50 3983
ruby-xor 5 240 5 257 50 803 50 1381
setivar 5 358 5 648 50 3185 50 5929
setivar_object 5 354 5 480 50 701 50 821
setivar_young 5 365 5 479 50 743 50 815
str_concat 5 398 5 452 50 970 50 1219
throw 5 1263 5 1281 50 1779 50 1707

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) 1417863 1257508 209 2204 0 0% 0 0 63.663749
chunky-png (click) 294951 267641 84 1124 1 0% 0 0 33.362405
erubi-rails (click) 1910802 1649716 259 2950 19 0% 0 0 81.663699
hexapdf (click) 1427077 1227284 595 13143 36 0% 0 0 377.476377
liquid-c (click) 469726 391104 114 1743 5 0% 0 0 48.509898
liquid-compile (click) 402211 336652 146 2087 2 0% 0 0 64.359112
liquid-render (click) 579219 506225 131 2309 8 0% 0 0 65.96884
lobsters (click) 8127604 6826241 3157 52684 104 0% 0 0 1809.884471
mail (click) 713357 647860 342 5318 14 0% 0 0 154.639558
psych-load (click) 276500 234316 61 615 3 0% 0 0 18.975176
railsbench (click) 3243594 2830535 1645 16280 52 0% 0 0 479.828564
rubocop (click) 5657964 4805833 2887 50563 110 0% 4 0 1484.677282
ruby-lsp (click) 812789 693640 305 4729 24 0% 0 0 134.540687
sequel (click) 449847 409118 11 94 0 0% 0 0 3.404986
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.262965
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.160213
erubi (click) 213262 172030 5 97 0 0% 0 0 3.243156
etanni (click) 27173 26329 8 88 0 0% 0 0 2.975653
fannkuchredux (click) 23046 13626 3 249 0 0% 0 0 7.311217
fluentd (click) 364773 297358 7 93 0 0% 0 0 3.16447
graphql (click) 391362 361091 66 676 0 0% 0 0 20.910228
graphql-native (click) 392557 352767 37 255 0 0% 0 0 8.611523
lee (click) 273795 255743 45 750 0 0% 0 0 23.318952
matmul (click) 10657 3512 8 109 0 0% 0 0 3.5379
nbody (click) 13065 17086 6 172 0 0% 0 0 4.382648
nqueens (click) 20163 27348 5 239 0 0% 0 0 6.889445
optcarrot (click) 319096 242804 188 4399 34 0% 0 0 101.839065
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.149817
protoboeuf-encode (click) 221107 212146 14 1220 0 0% 0 0 31.26567
rack (click) 236446 199781 32 385 0 0% 0 0 9.982731
ruby-json (click) 23776 20702 8 181 0 0% 0 0 5.156636
rubyboy (click) 685046 607960 177 5805 40 0% 0 0 143.979781
rubykon (click) 134065 128972 137 1489 3 0% 0 0 42.835654
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.427347
tinygql (click) 272170 247526 58 762 5 0% 0 0 21.798368
30k_ifelse (click) 5658804 5284852 9259 51668 0 0% 0 0 1410.066133
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 452.956498
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.335084
fib (click) 2599 2861 3 26 0 0% 0 0 0.976811
getivar (click) 3501 4713 3 51 0 0% 0 0 1.353309
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.596021
loops-times (click) 6703 7405 5 71 0 0% 0 0 2.308637
object-new (click) 1933 2093 2 22 0 0% 0 0 0.800336
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.726942
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.918625
setivar (click) 2652 3389 3 31 0 0% 0 0 1.018524
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.129697
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.33265
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.003417
throw (click) 5848 4291 5 46 0 0% 0 0 1.609863

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.