YJIT Benchmarks

Details for Benchmarks at 2024-12-20 03:44:35 UTC

YJIT metrics from the yjit-bench suite using Ruby 978df259ca.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 91.8% faster than CRuby 3.4.0dev
  • 5.9% faster than YJIT 3.3.6
On railsbench it is
  • 95.1% faster than CRuby 3.4.0dev
  • 4.4% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 51 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 83 5 81 50 156 50 167
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 427 50 588 50 625
liquid-compile 5 407 5 408 50 542 50 556
liquid-render 5 170 5 167 50 404 50 431
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 185 50 250 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 156 50 249 50 269
ruby-lsp 5 158 5 157 50 260 50 276
sequel 5 426 5 414 50 571 50 583
binarytrees 5 84 5 82 50 144 50 140
blurhash 5 82 5 82 50 127 50 145
erubi 5 123 5 151 50 90 50 150
etanni 5 90 5 99 50 54 50 70
fannkuchredux 5 52 5 54 50 101 50 99
fluentd 5 64 5 63 50 25 50 26
graphql 5 85 5 85 50 57 50 58
graphql-native 5 40 5 53 50 10 50 15
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 24 50 48 50 63
matmul 5 51 5 52 50 85 50 95
nbody 5 247 5 248 50 577 50 707
nqueens 5 120 5 120 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 167 50 620 50 723
protoboeuf-encode 5 179 5 196 50 327 50 811
rack 5 576 5 630 50 939 50 1055
ruby-json 5 83 5 85 50 50 50 51
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 48 50 163 50 160
tinygql 5 36 5 37 50 23 50 30
30k_ifelse 5 28 5 28 50 216 50 206
30k_methods 5 39 5 38 50 483 50 466
cfunc_itself 5 345 5 335 50 1046 50 1144
fib 5 127 5 126 50 909 50 937
getivar 5 207 5 224 50 2259 50 2637
keyword_args 5 106 5 106 50 959 50 1134
object-new 5 320 5 311 50 404 50 385
respond_to 5 133 5 137 50 3261 50 3980
ruby-xor 5 240 5 242 50 803 50 1347
setivar 5 358 5 357 50 3124 50 5708
setivar_object 5 374 5 338 50 749 50 828
setivar_young 5 374 5 355 50 769 50 854
str_concat 5 401 5 388 50 969 50 1218
throw 5 1261 5 1245 50 1742 50 1631

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) 1446158 1213033 210 2207 0 0% 0 0 63.741487
chunky-png (click) 297188 242817 85 1127 1 0% 0 0 33.325845
erubi-rails (click) 1920105 1626091 260 2997 19 0% 0 0 83.182777
hexapdf (click) 1439911 1253745 596 13145 41 0% 0 0 379.563469
liquid-c (click) 502645 386094 115 1750 5 0% 0 0 49.742142
liquid-compile (click) 428514 374683 147 2086 2 0% 0 0 64.834334
liquid-render (click) 605995 544876 132 2315 8 0% 0 0 65.896199
lobsters (click) 8114279 6752985 3213 52513 169 0% 0 0 1799.651629
mail (click) 729481 635349 343 5321 14 0% 0 0 154.842241
psych-load (click) 248747 207171 62 618 3 0% 0 0 19.365894
railsbench (click) 3237368 2798325 1642 16211 52 0% 0 0 496.088876
rubocop (click) 5658304 4935655 2888 50560 110 0% 4 0 1487.331996
ruby-lsp (click) 848842 749973 306 4737 24 0% 0 0 132.703096
sequel (click) 475910 407927 12 97 0 0% 0 0 3.790497
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.359381
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.37698
erubi (click) 249244 202110 6 100 0 0% 0 0 3.59852
etanni (click) 31129 29637 8 87 0 0% 0 0 2.997392
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.439044
fluentd (click) 346953 337025 8 96 0 0% 0 0 3.317486
graphql (click) 398428 346262 67 679 0 0% 0 0 21.360025
graphql-native (click) 368541 320757 38 258 0 0% 0 0 8.644937
lee (click) 296624 275485 46 749 0 0% 0 0 23.718482
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.398594
matmul (click) 10988 3769 9 112 0 0% 0 0 3.669528
nbody (click) 13396 17343 7 175 0 0% 0 0 4.552229
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.050753
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 101.239211
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.172418
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.272728
rack (click) 236500 201029 33 388 0 0% 0 0 10.306437
ruby-json (click) 20509 17904 9 181 0 0% 0 0 5.133446
rubykon (click) 136035 147112 138 1506 3 0% 0 0 43.445251
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.389975
tinygql (click) 292783 249048 59 765 5 0% 0 0 22.34124
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1414.696338
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 456.197271
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.49784
fib (click) 2930 3118 4 29 0 0% 0 0 1.109707
getivar (click) 3832 4970 4 54 0 0% 0 0 1.474807
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.769195
object-new (click) 2264 2350 3 25 0 0% 0 0 0.911827
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.916982
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 2.05231
setivar (click) 2983 3646 4 34 0 0% 0 0 1.14778
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.221641
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.454815
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.112886
throw (click) 6179 4548 6 49 0 0% 0 0 1.683884

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.