YJIT Benchmarks

Details for Benchmarks at 2024-12-11 03:48:41 UTC

YJIT metrics from the yjit-bench suite using Ruby 80038b9c9c.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.2% faster than CRuby 3.4.0dev
  • 5.1% faster than YJIT 3.3.6
On railsbench it is
  • 101.6% faster than CRuby 3.4.0dev
  • 5.1% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 50 minutes
aarch64 runtime: 3 hours, 18 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 84 5 83 50 156 50 165
chunky-png 5 31 5 32 50 16 50 33
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 408 5 425 50 592 50 630
liquid-compile 5 409 5 411 50 540 50 560
liquid-render 5 170 5 171 50 405 50 430
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 193 50 251 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 155 50 249 50 264
ruby-lsp 5 158 5 160 50 259 50 246
sequel 5 432 5 409 50 571 50 565
binarytrees 5 84 5 82 50 144 50 141
blurhash 5 82 5 83 50 127 50 145
erubi 5 75 5 136 50 30 50 149
etanni 5 91 5 101 50 54 50 73
fannkuchredux 5 52 5 55 50 101 50 105
fluentd 5 63 5 61 50 25 50 32
graphql 5 85 5 85 50 57 50 56
graphql-native 5 49 5 51 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 54 50 84 50 98
nbody 5 247 5 250 50 577 50 704
nqueens 5 120 5 120 50 75 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 177 5 176 50 620 50 745
protoboeuf-encode 5 179 5 201 50 327 50 841
rack 5 579 5 630 50 955 50 1076
ruby-json 5 83 5 86 50 50 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 36 5 37 50 23 50 28
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 39 5 39 50 479 50 477
cfunc_itself 5 342 5 335 50 1046 50 1145
fib 5 104 5 126 50 901 50 935
getivar 5 207 5 219 50 2271 50 2629
keyword_args 5 105 5 103 50 959 50 1134
object-new 5 321 5 310 50 404 50 379
respond_to 5 133 5 138 50 3255 50 3978
ruby-xor 5 242 5 248 50 804 50 1386
setivar 5 358 5 357 50 3125 50 5710
setivar_object 5 373 5 341 50 782 50 840
setivar_young 5 374 5 344 50 767 50 854
str_concat 5 403 5 393 50 964 50 1207
throw 5 1259 5 1273 50 1746 50 1669

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) 1422217 1148636 210 2211 0 0% 0 0 64.443222
chunky-png (click) 301925 266635 85 1127 1 0% 0 0 33.18459
erubi-rails (click) 1906421 1640303 259 2971 19 0% 0 0 81.970136
hexapdf (click) 1439384 1235431 597 13163 41 0% 0 0 378.617005
liquid-c (click) 472164 410950 115 1764 5 0% 0 0 49.869883
liquid-compile (click) 405247 343901 147 2098 2 0% 0 0 65.862417
liquid-render (click) 577009 481554 132 2329 8 0% 0 0 66.66467
lobsters (click) 8130676 6806661 3213 52650 170 0% 0 0 1799.215362
mail (click) 722531 646374 343 5330 14 0% 0 0 154.616954
psych-load (click) 266488 225934 62 618 3 0% 0 0 19.503792
railsbench (click) 3241203 2853271 1642 16216 52 0% 0 0 496.596609
rubocop (click) 5667036 4977437 2888 50551 110 0% 4 0 1470.769556
ruby-lsp (click) 817096 694493 306 4738 24 0% 0 0 134.758914
sequel (click) 469846 420424 12 102 0 0% 0 0 3.918587
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.381343
blurhash (click) 50590 43092 28 442 0 0% 0 0 14.346925
erubi (click) 224895 171338 6 100 0 0% 0 0 3.260883
etanni (click) 31129 29637 8 87 0 0% 0 0 3.006621
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.46598
fluentd (click) 369784 323295 8 96 0 0% 0 0 3.276068
graphql (click) 413833 372071 67 679 0 0% 0 0 21.228848
graphql-native (click) 361571 335673 38 258 0 0% 0 0 8.702807
lee (click) 281574 240105 46 749 0 0% 0 0 23.447554
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.370623
matmul (click) 10988 3769 9 112 0 0% 0 0 3.662875
nbody (click) 13396 17343 7 175 0 0% 0 0 4.544606
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.050344
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 101.091142
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.467293
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.448556
rack (click) 231659 206398 33 388 0 0% 0 0 10.176326
ruby-json (click) 26129 23082 9 181 0 0% 0 0 5.096116
rubykon (click) 136035 147112 138 1506 3 0% 0 0 43.122607
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.365607
tinygql (click) 276349 244048 59 765 5 0% 0 0 21.579153
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1417.998347
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 454.231806
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.444094
fib (click) 2930 3118 4 29 0 0% 0 0 1.095338
getivar (click) 3832 4970 4 54 0 0% 0 0 1.463723
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.774144
object-new (click) 2264 2350 3 25 0 0% 0 0 0.941101
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.919337
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.964096
setivar (click) 2983 3646 4 34 0 0% 0 0 1.11124
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.204514
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.423626
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.117989
throw (click) 6179 4548 6 49 0 0% 0 0 1.716517

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.