YJIT Benchmarks

Details for Benchmarks at 2025-01-04 03:43:35 UTC

YJIT metrics from the yjit-bench suite using Ruby 607b1b3d76.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.4% faster than CRuby 3.5.0dev
  • 4.9% faster than YJIT 3.3.6
On railsbench it is
  • 94.4% faster than CRuby 3.5.0dev
  • 4.2% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 minutes
aarch64 runtime: 3 hours, 19 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 82 5 84 50 153 50 161
chunky-png 5 32 5 32 50 15 50 33
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 424 50 592 50 616
liquid-compile 5 409 5 422 50 541 50 556
liquid-render 5 169 5 169 50 405 50 436
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 186 50 252 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 248 50 266
ruby-lsp 5 155 5 139 50 248 50 267
sequel 5 432 5 419 50 594 50 574
binarytrees 5 83 5 81 50 144 50 139
blurhash 5 82 5 82 50 124 50 145
erubi 5 124 5 150 50 85 50 150
etanni 5 91 5 99 50 54 50 71
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 64 5 62 50 25 50 23
graphql 5 85 5 84 50 57 50 56
graphql-native 5 40 5 53 50 10 50 15
lee 5 23 5 22 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 51 5 52 50 83 50 97
nbody 5 247 5 258 50 577 50 679
nqueens 5 120 5 120 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 176 50 619 50 720
protoboeuf-encode 5 180 5 196 50 324 50 830
rack 5 576 5 639 50 953 50 1056
ruby-json 5 84 5 84 50 50 50 48
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 36 5 37 50 22 50 29
30k_ifelse 5 28 5 28 50 216 50 207
30k_methods 5 39 5 38 50 484 50 478
cfunc_itself 5 346 5 337 50 1046 50 1145
fib 5 127 5 129 50 909 50 937
getivar 5 207 5 221 50 2256 50 2630
keyword_args 5 107 5 105 50 959 50 1134
object-new 5 321 5 311 50 405 50 378
respond_to 5 133 5 141 50 3260 50 3984
ruby-xor 5 241 5 247 50 803 50 1384
setivar 5 358 5 357 50 3124 50 5711
setivar_object 5 374 5 342 50 747 50 845
setivar_young 5 374 5 344 50 769 50 855
str_concat 5 402 5 388 50 968 50 1207
throw 5 1259 5 1265 50 1739 50 1654

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) 1423058 1220223 210 2207 0 0% 0 0 64.252234
chunky-png (click) 295459 292234 85 1127 1 0% 0 0 33.859811
erubi-rails (click) 1903149 1638294 260 2982 19 0% 0 0 81.752129
hexapdf (click) 1463146 1257653 596 13146 41 0% 0 0 381.471629
liquid-c (click) 500437 450413 115 1750 5 0% 0 0 50.058905
liquid-compile (click) 432923 362661 147 2087 2 0% 0 0 65.435816
liquid-render (click) 610558 491786 132 2315 8 0% 0 0 65.993364
lobsters (click) 8094525 6669375 3213 52415 171 0% 0 0 1811.201632
mail (click) 761388 712305 343 5330 14 0% 0 0 155.053815
psych-load (click) 243071 206581 62 618 3 0% 0 0 19.202847
railsbench (click) 3228724 2825194 1642 16173 52 0% 0 0 476.915874
rubocop (click) 5665086 4891382 2888 50519 110 0% 4 0 1478.99306
ruby-lsp (click) 835474 698692 306 4737 24 0% 0 0 134.499866
sequel (click) 476399 408528 12 97 0 0% 0 0 3.401818
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.357527
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.467314
erubi (click) 254904 214453 6 100 0 0% 0 0 3.448807
etanni (click) 31129 29637 8 87 0 0% 0 0 3.000221
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.507686
fluentd (click) 372063 333346 8 96 0 0% 0 0 3.368312
graphql (click) 394478 329429 67 679 0 0% 0 0 21.616436
graphql-native (click) 372963 337102 38 258 0 0% 0 0 8.644031
lee (click) 278046 242129 46 749 0 0% 0 0 23.454129
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.411063
matmul (click) 10988 3769 9 112 0 0% 0 0 3.671619
nbody (click) 13396 17343 7 175 0 0% 0 0 4.581987
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.054475
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 100.821137
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.409923
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.220733
rack (click) 264443 232676 33 388 0 0% 0 0 10.148895
ruby-json (click) 25911 22980 9 181 0 0% 0 0 5.154095
rubykon (click) 135230 146429 138 1500 3 0% 0 0 43.208064
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.486901
tinygql (click) 292783 249048 59 765 5 0% 0 0 21.848673
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1426.397418
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 451.4914
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.5263
fib (click) 2930 3118 4 29 0 0% 0 0 1.132589
getivar (click) 3832 4970 4 54 0 0% 0 0 1.509518
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.764811
object-new (click) 2264 2350 3 25 0 0% 0 0 0.922798
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.868286
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.002844
setivar (click) 2983 3646 4 34 0 0% 0 0 1.14177
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.250905
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.5157
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.11013
throw (click) 6179 4548 6 49 0 0% 0 0 1.711139

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.