YJIT Benchmarks

Details for Benchmarks at 2025-05-08 03:51:21 UTC

YJIT metrics from the yjit-bench suite using Ruby 4e30b77b90.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.1% faster than CRuby 3.5.0dev
  • 7.8% faster than YJIT 3.3.6
On railsbench it is
  • 103.0% faster than CRuby 3.5.0dev
  • 9.6% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 42 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 85 50 148 50 174
chunky-png 5 31 5 33 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 407 5 430 50 563 50 619
liquid-compile 5 412 5 463 50 538 50 705
liquid-render 5 171 5 173 50 405 50 382
lobsters 5 19 5 19 50 10 50 10
mail 5 189 5 181 50 239 50 210
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 161 50 252 50 275
ruby-lsp 5 144 5 163 50 243 50 270
sequel 5 434 5 427 50 600 50 598
binarytrees 5 84 5 83 50 149 50 140
blurhash 5 82 5 88 50 127 50 145
erubi 5 119 5 149 50 92 50 150
etanni 5 91 5 104 50 54 50 72
fannkuchredux 5 52 5 57 50 99 50 114
fluentd 5 64 5 60 50 26 50 32
graphql 5 85 5 89 50 57 50 61
graphql-native 5 49 5 56 50 10 50 16
lee 5 22 5 26 50 10 50 10
matmul 5 50 5 51 50 85 50 99
nbody 5 247 5 250 50 575 50 669
nqueens 5 120 5 124 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 187 50 618 50 731
protoboeuf-encode 5 179 5 216 50 327 50 817
rack 5 587 5 636 50 943 50 1067
ruby-json 5 84 5 84 50 50 50 49
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
sudoku 5 48 5 51 50 162 50 173
tinygql 5 36 5 39 50 22 50 33
30k_ifelse 5 28 5 28 50 214 50 206
30k_methods 5 38 5 38 50 481 50 470
cfunc_itself 5 346 5 374 50 1147 50 1258
fib 5 127 5 145 50 910 50 933
getivar 5 207 5 325 50 2238 50 2763
keyword_args 5 107 5 109 50 1042 50 1244
loops-times 5 24 5 27 50 47 50 65
object-new 5 323 5 358 50 404 50 635
respond_to 5 134 5 141 50 3259 50 3991
ruby-xor 5 241 5 263 50 801 50 1375
setivar 5 357 5 597 50 3190 50 5909
setivar_object 5 355 5 465 50 664 50 807
setivar_young 5 365 5 465 50 686 50 802
str_concat 5 398 5 463 50 963 50 1157
throw 5 1259 5 1273 50 1755 50 1698

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) 1451006 1258300 206 2230 0 0% 0 0 63.322934
chunky-png (click) 296207 235979 74 1073 1 0% 0 0 31.137394
erubi-rails (click) 1918731 1644525 262 3116 21 0% 0 0 85.938245
hexapdf (click) 1456374 1296833 595 13375 40 0% 0 0 378.03976
liquid-c (click) 509330 423426 114 1759 5 0% 0 0 48.926943
liquid-compile (click) 437532 349965 146 2186 2 0% 0 0 67.599378
liquid-render (click) 613685 509769 131 2326 8 0% 0 0 66.328702
lobsters (click) 8295267 6961931 3171 54481 112 0% 0 0 1890.48199
mail (click) 769296 711000 342 5636 40 0% 0 0 161.767663
psych-load (click) 284318 248384 61 646 3 0% 0 0 19.804765
railsbench (click) 3302640 2825626 1653 16765 54 0% 0 0 472.192758
rubocop (click) 5709222 4757082 2885 51151 113 0% 4 0 1578.77043
ruby-lsp (click) 823581 767132 305 4837 24 0% 0 0 131.960968
sequel (click) 483772 414638 11 94 0 0% 0 0 3.7443
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.194296
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.122958
erubi (click) 258131 218700 5 99 0 0% 0 0 3.22608
etanni (click) 30101 29597 8 88 0 0% 0 0 2.991673
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.391317
fluentd (click) 379807 321452 7 93 0 0% 0 0 3.184536
graphql (click) 407799 380866 66 705 0 0% 0 0 20.311418
graphql-native (click) 374808 311643 37 293 0 0% 0 0 8.976392
lee (click) 281266 221391 45 799 0 0% 0 0 24.328923
matmul (click) 10810 11796 8 111 0 0% 0 0 3.623076
nbody (click) 13050 17086 6 172 0 0% 0 0 4.490797
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.003407
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 101.470803
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.742973
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.386213
rack (click) 268930 195643 31 384 0 0% 0 0 10.171288
ruby-json (click) 24443 21290 8 181 0 0% 0 0 5.010271
rubyboy (click) 697380 616834 177 5888 40 0% 0 0 145.545515
rubykon (click) 135591 113219 137 1515 3 0% 0 0 42.756183
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.765871
tinygql (click) 280235 235554 58 828 5 0% 0 0 22.574421
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1433.73178
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 453.651779
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.323261
fib (click) 2599 2861 3 26 0 0% 0 0 0.964686
getivar (click) 3501 4713 3 51 0 0% 0 0 1.348485
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.598481
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.301456
object-new (click) 2301 2493 2 29 0 0% 0 0 0.963105
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.85203
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.872823
setivar (click) 2652 3389 3 31 0 0% 0 0 1.015193
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.134719
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.376352
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.084852
throw (click) 5848 4291 5 46 0 0% 0 0 1.604796

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.