YJIT Benchmarks

Details for Benchmarks at 2024-12-19 03:47:34 UTC

YJIT metrics from the yjit-bench suite using Ruby 68e2022b5b.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 92.0% faster than CRuby 3.4.0dev
  • 5.9% faster than YJIT 3.3.6
On railsbench it is
  • 99.4% faster than CRuby 3.4.0dev
  • 5.6% 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.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 80 5 81 50 156 50 162
chunky-png 5 32 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 423 50 590 50 626
liquid-compile 5 410 5 408 50 543 50 564
liquid-render 5 172 5 169 50 409 50 439
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 193 50 251 50 254
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 157 50 250 50 268
ruby-lsp 5 156 5 157 50 247 50 275
sequel 5 428 5 414 50 596 50 574
binarytrees 5 84 5 82 50 144 50 142
blurhash 5 82 5 83 50 127 50 145
erubi 5 87 5 147 50 98 50 129
etanni 5 90 5 99 50 54 50 71
fannkuchredux 5 52 5 54 50 101 50 102
fluentd 5 63 5 61 50 25 50 31
graphql 5 84 5 85 50 57 50 56
graphql-native 5 40 5 53 50 10 50 15
lee 5 22 5 22 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 50 5 51 50 85 50 98
nbody 5 247 5 252 50 577 50 706
nqueens 5 120 5 120 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 174 50 620 50 726
protoboeuf-encode 5 179 5 199 50 327 50 790
rack 5 577 5 632 50 944 50 1034
ruby-json 5 83 5 84 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 47 5 48 50 164 50 161
tinygql 5 36 5 38 50 23 50 28
30k_ifelse 5 28 5 28 50 214 50 205
30k_methods 5 38 5 38 50 484 50 476
cfunc_itself 5 346 5 337 50 1046 50 1145
fib 5 127 5 128 50 908 50 937
getivar 5 207 5 213 50 2260 50 2615
keyword_args 5 106 5 105 50 959 50 1134
object-new 5 321 5 310 50 404 50 377
respond_to 5 133 5 138 50 3261 50 3978
ruby-xor 5 242 5 248 50 803 50 1251
setivar 5 358 5 356 50 3122 50 5704
setivar_object 5 374 5 337 50 747 50 836
setivar_young 5 374 5 344 50 769 50 853
str_concat 5 401 5 395 50 969 50 1209
throw 5 1261 5 1228 50 1744 50 1667

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) 1410386 1135351 210 2207 0 0% 0 0 64.508211
chunky-png (click) 283256 234945 85 1127 1 0% 0 0 33.625745
erubi-rails (click) 1902677 1593616 260 2960 19 0% 0 0 80.846528
hexapdf (click) 1465784 1202038 596 13145 41 0% 0 0 381.832544
liquid-c (click) 469428 391913 115 1750 5 0% 0 0 48.773319
liquid-compile (click) 396273 379851 147 2074 2 0% 0 0 63.826113
liquid-render (click) 603316 519066 132 2315 8 0% 0 0 65.16916
lobsters (click) 8112579 6811258 3213 52505 169 0% 0 0 1775.07483
mail (click) 760973 702880 343 5321 14 0% 0 0 158.028976
psych-load (click) 277613 234998 62 620 3 0% 0 0 19.286402
railsbench (click) 3252496 2868583 1642 16176 52 0% 0 0 469.43869
rubocop (click) 5667998 4802454 2888 50556 110 0% 4 0 1471.798534
ruby-lsp (click) 809011 722913 306 4733 24 0% 0 0 132.440973
sequel (click) 449544 407695 12 94 0 0% 0 0 3.396507
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.376688
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.348545
erubi (click) 252686 212690 6 100 0 0% 0 0 3.372567
etanni (click) 27627 26630 9 91 0 0% 0 0 3.104552
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.409515
fluentd (click) 341157 308648 8 96 0 0% 0 0 3.311003
graphql (click) 399256 371600 67 679 0 0% 0 0 21.253994
graphql-native (click) 388445 349149 38 258 0 0% 0 0 8.765522
lee (click) 300061 269696 46 749 0 0% 0 0 23.483191
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.383947
matmul (click) 10988 3769 9 112 0 0% 0 0 3.690487
nbody (click) 13396 17343 7 175 0 0% 0 0 4.616002
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.060023
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 100.293583
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.467036
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.375691
rack (click) 237233 214878 33 388 0 0% 0 0 10.00669
ruby-json (click) 25911 22980 9 181 0 0% 0 0 5.139657
rubykon (click) 134396 137392 138 1492 3 0% 0 0 42.887917
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.45943
tinygql (click) 268429 242690 59 765 5 0% 0 0 21.69667
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1424.08698
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 454.869901
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.440397
fib (click) 2930 3118 4 29 0 0% 0 0 1.096034
getivar (click) 3832 4970 4 54 0 0% 0 0 1.499225
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.768864
object-new (click) 2264 2350 3 25 0 0% 0 0 0.926594
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.894669
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.983413
setivar (click) 2983 3646 4 34 0 0% 0 0 1.145593
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.26282
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.484162
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.175307
throw (click) 6179 4548 6 49 0 0% 0 0 1.690091

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.