YJIT Benchmarks

Details for Benchmarks at 2024-12-15 03:49:18 UTC

YJIT metrics from the yjit-bench suite using Ruby 9486f46a1e.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.6% faster than CRuby 3.4.0dev
  • 4.2% faster than YJIT 3.3.6
On railsbench it is
  • 94.0% faster than CRuby 3.4.0dev
  • 1.7% 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 82 5 83 50 155 50 167
chunky-png 5 31 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 411 5 425 50 574 50 628
liquid-compile 5 409 5 410 50 539 50 557
liquid-render 5 168 5 166 50 408 50 436
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 187 50 235 50 240
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 250 50 266
ruby-lsp 5 158 5 139 50 258 50 202
sequel 5 420 5 407 50 572 50 574
binarytrees 5 84 5 82 50 144 50 139
blurhash 5 81 5 83 50 127 50 145
erubi 5 116 5 149 50 86 50 141
etanni 5 90 5 99 50 54 50 70
fannkuchredux 5 52 5 53 50 101 50 101
fluentd 5 64 5 61 50 25 50 30
graphql 5 84 5 84 50 57 50 59
graphql-native 5 41 5 52 50 10 50 15
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 51 5 52 50 85 50 97
nbody 5 244 5 247 50 577 50 705
nqueens 5 120 5 119 50 75 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 171 50 619 50 718
protoboeuf-encode 5 180 5 197 50 327 50 825
rack 5 583 5 631 50 943 50 1059
ruby-json 5 84 5 84 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 161
tinygql 5 36 5 37 50 23 50 28
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 39 5 38 50 484 50 472
cfunc_itself 5 345 5 334 50 1046 50 1145
fib 5 127 5 127 50 909 50 937
getivar 5 207 5 224 50 2257 50 2637
keyword_args 5 99 5 106 50 959 50 1134
object-new 5 321 5 311 50 404 50 385
respond_to 5 133 5 138 50 3261 50 3982
ruby-xor 5 240 5 248 50 803 50 1383
setivar 5 358 5 358 50 3126 50 5708
setivar_object 5 374 5 347 50 748 50 846
setivar_young 5 374 5 344 50 770 50 854
str_concat 5 402 5 391 50 968 50 1183
throw 5 1261 5 1230 50 1741 50 1609

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) 1445025 1277088 210 2211 0 0% 0 0 64.251473
chunky-png (click) 319554 240815 85 1127 1 0% 0 0 33.006859
erubi-rails (click) 1907764 1639457 259 2976 19 0% 0 0 81.095979
hexapdf (click) 1439131 1226925 596 13159 41 0% 0 0 376.558505
liquid-c (click) 501926 443896 115 1764 5 0% 0 0 50.152407
liquid-compile (click) 404336 355000 147 2109 2 0% 0 0 66.565969
liquid-render (click) 609494 515795 132 2329 8 0% 0 0 65.817122
lobsters (click) 8124576 6793611 3214 52795 171 0% 0 0 1779.741515
mail (click) 763670 680632 343 5321 14 0% 0 0 156.805979
psych-load (click) 251919 213153 62 618 3 0% 0 0 19.250883
railsbench (click) 3254939 2780026 1642 16213 52 0% 0 0 475.060406
rubocop (click) 5697923 4928777 2888 50612 110 0% 4 0 1496.872417
ruby-lsp (click) 820488 706425 306 4745 24 0% 0 0 134.390777
sequel (click) 479072 427451 12 109 0 0% 0 0 4.193418
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.388122
blurhash (click) 50590 43092 28 442 0 0% 0 0 14.341225
erubi (click) 220230 168195 6 100 0 0% 0 0 3.293384
etanni (click) 27627 26630 9 91 0 0% 0 0 3.118378
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.442749
fluentd (click) 345760 326532 8 96 0 0% 0 0 3.290335
graphql (click) 423367 338415 67 679 0 0% 0 0 21.260568
graphql-native (click) 394961 354124 38 258 0 0% 0 0 8.740829
lee (click) 270026 211153 46 749 0 0% 0 0 23.615778
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.424123
matmul (click) 10988 3769 9 112 0 0% 0 0 3.597669
nbody (click) 13396 17343 7 175 0 0% 0 0 4.606681
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.062199
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 103.434842
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.3107
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.379829
rack (click) 262321 239115 33 388 0 0% 0 0 10.203135
ruby-json (click) 25911 22980 9 181 0 0% 0 0 5.159959
rubykon (click) 134794 137671 138 1494 3 0% 0 0 43.048963
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.364541
tinygql (click) 297777 252579 59 765 5 0% 0 0 21.884845
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1418.836191
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 454.618844
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.500476
fib (click) 2930 3118 4 29 0 0% 0 0 1.138341
getivar (click) 3832 4970 4 54 0 0% 0 0 1.486693
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.768093
object-new (click) 2264 2350 3 25 0 0% 0 0 0.945553
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.897967
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.99814
setivar (click) 2983 3646 4 34 0 0% 0 0 1.142909
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.245015
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.452141
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.145003
throw (click) 6179 4548 6 49 0 0% 0 0 1.691516

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.