YJIT Benchmarks

Details for Benchmarks at 2025-01-25 03:43:40 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.4% faster than CRuby 3.5.0dev
  • 6.5% faster than YJIT 3.3.6
On railsbench it is
  • 96.5% faster than CRuby 3.5.0dev
  • 6.2% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 50 minutes
aarch64 runtime: 3 hours, 20 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 83 50 155 50 161
chunky-png 5 31 5 33 50 15 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 417 50 591 50 628
liquid-compile 5 413 5 422 50 540 50 560
liquid-render 5 171 5 171 50 405 50 433
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 194 50 236 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 157 50 250 50 267
ruby-lsp 5 158 5 155 50 240 50 269
sequel 5 428 5 416 50 601 50 567
binarytrees 5 84 5 79 50 149 50 128
blurhash 5 82 5 82 50 127 50 145
erubi 5 116 5 150 50 62 50 150
etanni 5 90 5 98 50 54 50 71
fannkuchredux 5 52 5 54 50 99 50 107
fluentd 5 64 5 63 50 26 50 29
graphql 5 85 5 85 50 57 50 59
graphql-native 5 40 5 52 50 10 50 13
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 54 50 85 50 72
nbody 5 248 5 251 50 577 50 704
nqueens 5 120 5 123 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 172 50 620 50 713
protoboeuf-encode 5 180 5 201 50 328 50 829
rack 5 581 5 632 50 950 50 1056
ruby-json 5 83 5 83 50 49 50 51
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 164 50 170
tinygql 5 35 5 38 50 23 50 28
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 39 5 38 50 481 50 475
cfunc_itself 5 345 5 337 50 1147 50 1254
fib 5 127 5 133 50 910 50 933
getivar 5 207 5 318 50 2241 50 2762
keyword_args 5 107 5 104 50 1042 50 1240
loops-times 5 24 5 25 50 48 50 65
object-new 5 322 5 280 50 404 50 314
respond_to 5 134 5 140 50 3258 50 3976
ruby-xor 5 240 5 230 50 803 50 1377
setivar 5 358 5 580 50 3191 50 5903
setivar_object 5 354 5 400 50 699 50 722
setivar_young 5 365 5 400 50 743 50 789
str_concat 5 400 5 450 50 969 50 1212
throw 5 1265 5 1139 50 1785 50 1472

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) 1448863 1250114 209 2204 0 0% 0 0 67.675996
chunky-png (click) 297433 236594 84 1129 1 0% 0 0 33.745429
erubi-rails (click) 1900976 1640438 259 2941 19 0% 0 0 80.96539
hexapdf (click) 1444798 1316445 596 13146 36 0% 0 0 376.557319
liquid-c (click) 482398 418906 114 1743 5 0% 0 0 48.184145
liquid-compile (click) 405222 339123 146 2062 2 0% 0 0 63.38436
liquid-render (click) 573473 502386 131 2309 8 0% 0 0 65.238145
lobsters (click) 8115108 6766551 3208 52561 169 0% 0 0 1793.433066
mail (click) 728932 594038 342 5318 14 0% 0 0 154.495392
psych-load (click) 238567 202499 61 615 3 0% 0 0 19.35207
railsbench (click) 3243689 2749745 1645 16265 52 0% 0 0 466.339413
rubocop (click) 5666264 4878703 2887 50561 110 0% 4 0 1470.363939
ruby-lsp (click) 840842 735494 305 4735 24 0% 0 0 133.945507
sequel (click) 464402 374600 11 94 0 0% 0 0 3.426822
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.24702
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.08878
erubi (click) 253950 213585 5 97 0 0% 0 0 3.28127
etanni (click) 27173 26329 8 88 0 0% 0 0 3.018217
fannkuchredux (click) 23046 13626 3 249 0 0% 0 0 7.418146
fluentd (click) 390511 327843 7 93 0 0% 0 0 3.152513
graphql (click) 392987 362521 66 676 0 0% 0 0 20.931554
graphql-native (click) 364049 318327 37 255 0 0% 0 0 8.080688
lee (click) 268304 252272 45 750 0 0% 0 0 23.214671
matmul (click) 10657 3512 8 109 0 0% 0 0 3.541754
nbody (click) 13065 17086 6 172 0 0% 0 0 4.443847
nqueens (click) 20163 27348 5 239 0 0% 0 0 7.087056
optcarrot (click) 319096 242804 188 4399 34 0% 0 0 102.300997
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.4659
protoboeuf-encode (click) 221107 212146 14 1220 0 0% 0 0 31.386594
rack (click) 230565 189059 32 385 0 0% 0 0 10.317734
ruby-json (click) 20461 17978 8 181 0 0% 0 0 5.117212
rubykon (click) 135455 122093 137 1500 3 0% 0 0 43.202606
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.473839
tinygql (click) 274408 234019 58 762 5 0% 0 0 21.681224
30k_ifelse (click) 5658804 5284852 9259 51668 0 0% 0 0 1419.290847
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 452.18591
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.366422
fib (click) 2599 2861 3 26 0 0% 0 0 0.97154
getivar (click) 3501 4713 3 51 0 0% 0 0 1.34621
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.610525
loops-times (click) 6703 7405 5 71 0 0% 0 0 2.339757
object-new (click) 1933 2093 2 22 0 0% 0 0 0.823586
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.802722
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.892342
setivar (click) 2652 3389 3 31 0 0% 0 0 1.03882
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.157868
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.336808
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.032452
throw (click) 5848 4291 5 46 0 0% 0 0 1.644677

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.