YJIT Benchmarks

Details for Benchmarks at 2025-01-09 03:48:51 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.7% faster than CRuby 3.5.0dev
  • 4.9% faster than YJIT 3.3.6
On railsbench it is
  • 92.0% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.3.6
x86_64 runtime: 3 hours, 55 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.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 84 50 157 50 161
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 421 5 423 50 589 50 625
liquid-compile 5 408 5 410 50 567 50 559
liquid-render 5 172 5 171 50 404 50 420
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 189 50 252 50 253
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 156 50 248 50 262
ruby-lsp 5 155 5 160 50 248 50 242
sequel 5 428 5 425 50 570 50 592
binarytrees 5 84 5 82 50 144 50 141
blurhash 5 82 5 81 50 127 50 145
erubi 5 121 5 144 50 98 50 151
etanni 5 90 5 98 50 54 50 73
fannkuchredux 5 52 5 55 50 101 50 104
fluentd 5 64 5 60 50 24 50 22
graphql 5 85 5 86 50 57 50 58
graphql-native 5 40 5 52 50 10 50 15
lee 5 23 5 22 50 10 50 10
loops-times 5 24 5 23 50 48 50 65
matmul 5 50 5 51 50 85 50 97
nbody 5 248 5 241 50 577 50 707
nqueens 5 120 5 119 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 172 50 620 50 718
protoboeuf-encode 5 180 5 193 50 327 50 813
rack 5 589 5 630 50 949 50 1081
ruby-json 5 84 5 84 50 50 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 161
tinygql 5 36 5 38 50 22 50 28
30k_ifelse 5 28 5 28 50 214 50 205
30k_methods 5 38 5 38 50 475 50 477
cfunc_itself 5 346 5 340 50 1045 50 1143
fib 5 126 5 126 50 909 50 935
getivar 5 207 5 217 50 2256 50 2621
keyword_args 5 107 5 101 50 958 50 1134
object-new 5 321 5 266 50 404 50 303
respond_to 5 134 5 139 50 3259 50 3979
ruby-xor 5 240 5 237 50 803 50 1379
setivar 5 358 5 358 50 3127 50 5700
setivar_object 5 374 5 341 50 747 50 851
setivar_young 5 373 5 343 50 769 50 854
str_concat 5 402 5 407 50 967 50 1190
throw 5 1261 5 1090 50 1739 50 1648

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) 1440990 1226184 210 2207 0 0% 0 0 63.220942
chunky-png (click) 323703 292958 85 1127 1 0% 0 0 33.053067
erubi-rails (click) 1920342 1674744 261 2974 19 0% 0 0 81.137347
hexapdf (click) 1466629 1227293 596 13146 41 0% 0 0 378.499013
liquid-c (click) 501582 451626 115 1750 5 0% 0 0 49.418764
liquid-compile (click) 433439 346937 147 2094 2 0% 0 0 65.10485
liquid-render (click) 593211 494645 132 2315 8 0% 0 0 65.598363
lobsters (click) 8104964 6803814 3211 52442 169 0% 0 0 1789.416121
mail (click) 757844 668079 343 5321 14 0% 0 0 153.687891
psych-load (click) 274996 224800 62 620 3 0% 0 0 19.442827
railsbench (click) 3234563 2732337 1642 16182 52 0% 0 0 466.997955
rubocop (click) 5692156 4768328 2888 50557 110 0% 4 0 1474.560533
ruby-lsp (click) 840458 718718 306 4737 24 0% 0 0 133.096498
sequel (click) 445819 390335 12 97 0 0% 0 0 3.759303
binarytrees (click) 7424 6400 7 55 0 0% 0 0 2.40444
blurhash (click) 50449 51120 28 441 0 0% 0 0 14.167172
erubi (click) 250476 211004 6 100 0 0% 0 0 3.339875
etanni (click) 27627 26630 9 91 0 0% 0 0 3.093496
fannkuchredux (click) 23377 30267 4 252 0 0% 0 0 7.427577
fluentd (click) 335083 294001 8 96 0 0% 0 0 3.324374
graphql (click) 401323 356755 67 679 0 0% 0 0 21.336127
graphql-native (click) 393322 344617 38 258 0 0% 0 0 8.569166
lee (click) 277013 246765 46 749 0 0% 0 0 23.503218
loops-times (click) 7034 7662 6 74 0 0% 0 0 2.400313
matmul (click) 10988 3769 9 112 0 0% 0 0 3.679755
nbody (click) 13396 17343 7 175 0 0% 0 0 4.586525
nqueens (click) 20494 27605 6 242 0 0% 0 0 7.003229
optcarrot (click) 319427 243061 189 4402 34 0% 0 0 102.969504
protoboeuf (click) 151228 130005 13 1484 0 0% 0 0 42.266203
protoboeuf-encode (click) 221443 220595 15 1223 0 0% 0 0 31.000567
rack (click) 265588 225669 33 388 0 0% 0 0 10.210271
ruby-json (click) 24110 21036 9 181 0 0% 0 0 5.073479
rubykon (click) 134794 137671 138 1494 3 0% 0 0 42.683365
sudoku (click) 45866 41280 8 521 0 0% 0 0 15.34076
tinygql (click) 272840 219853 59 765 5 0% 0 0 21.806991
30k_ifelse (click) 5659135 5285109 9260 51671 0 0% 0 0 1414.367872
30k_methods (click) 2234900 1593140 5779 19354 0 0% 0 0 451.717536
cfunc_itself (click) 5461 4343 5 50 0 0% 0 0 1.447605
fib (click) 2930 3118 4 29 0 0% 0 0 1.076917
getivar (click) 3832 4970 4 54 0 0% 0 0 1.431016
keyword_args (click) 6651 5070 6 52 0 0% 0 0 1.706698
object-new (click) 2264 2350 3 25 0 0% 0 0 0.917082
respond_to (click) 6199 6484 5 65 0 0% 0 0 1.904453
ruby-xor (click) 5662 6266 5 67 0 0% 0 0 1.966565
setivar (click) 2983 3646 4 34 0 0% 0 0 1.113389
setivar_object (click) 3512 3794 4 36 0 0% 0 0 1.222558
setivar_young (click) 4222 4516 5 44 0 0% 0 0 1.432186
str_concat (click) 5800 6273 7 65 0 0% 0 0 2.130273
throw (click) 6179 4548 6 49 0 0% 0 0 1.697179

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.