YJIT Benchmarks

Details for Benchmarks at 2025-04-30 03:49:03 UTC

YJIT metrics from the yjit-bench suite using Ruby 6f1caa561c.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.2% faster than CRuby 3.5.0dev
  • 7.2% faster than YJIT 3.3.6
On railsbench it is
  • 103.6% faster than CRuby 3.5.0dev
  • 6.5% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 42 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 83 5 87 50 151 50 182
chunky-png 5 31 5 33 50 15 50 24
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 413 50 566 50 575
liquid-compile 5 409 5 457 50 546 50 703
liquid-render 5 169 5 166 50 403 50 442
lobsters 5 19 5 19 50 10 50 10
mail 5 196 5 177 50 251 50 202
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 159 50 252 50 275
ruby-lsp 5 156 5 163 50 243 50 271
sequel 5 433 5 417 50 601 50 595
binarytrees 5 84 5 82 50 148 50 135
blurhash 5 82 5 86 50 127 50 145
erubi 5 124 5 141 50 99 50 147
etanni 5 90 5 101 50 54 50 70
fannkuchredux 5 52 5 58 50 99 50 108
fluentd 5 63 5 64 50 25 50 28
graphql 5 85 5 86 50 56 50 60
graphql-native 5 47 5 56 50 10 50 16
lee 5 23 5 25 50 10 50 10
matmul 5 50 5 51 50 85 50 94
nbody 5 248 5 235 50 575 50 659
nqueens 5 120 5 130 50 75 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 189 50 621 50 742
protoboeuf-encode 5 180 5 217 50 329 50 817
rack 5 586 5 641 50 947 50 1072
ruby-json 5 84 5 81 50 49 50 48
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 23 50 10 50 10
sudoku 5 48 5 51 50 162 50 162
tinygql 5 35 5 39 50 22 50 32
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 38 5 38 50 480 50 475
cfunc_itself 5 346 5 363 50 1147 50 1258
fib 5 127 5 149 50 910 50 932
getivar 5 207 5 326 50 2243 50 2767
keyword_args 5 107 5 111 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 362 50 403 50 653
respond_to 5 133 5 140 50 3257 50 3988
ruby-xor 5 241 5 262 50 801 50 1349
setivar 5 358 5 597 50 3192 50 5911
setivar_object 5 355 5 438 50 665 50 803
setivar_young 5 365 5 438 50 685 50 799
str_concat 5 398 5 444 50 962 50 1124
throw 5 1261 5 1253 50 1741 50 1632

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) 1455799 1221550 206 2230 0 0% 0 0 64.519954
chunky-png (click) 297198 260155 74 1073 1 0% 0 0 31.864814
erubi-rails (click) 1915307 1598435 262 3086 21 0% 0 0 84.218543
hexapdf (click) 1455639 1246139 596 13347 40 0% 0 0 385.072541
liquid-c (click) 513414 459423 114 1758 5 0% 0 0 49.162772
liquid-compile (click) 419669 391625 146 2190 2 0% 0 0 68.530731
liquid-render (click) 596016 485749 131 2325 8 0% 0 0 65.734748
lobsters (click) 8318533 7026531 3170 54614 112 0% 0 0 1857.406041
mail (click) 762287 680471 342 5636 40 0% 0 0 165.371078
psych-load (click) 258040 233234 61 645 3 0% 0 0 19.701033
railsbench (click) 3299255 2791574 1653 16844 54 0% 0 0 493.239346
rubocop (click) 5713401 4759934 2885 51136 113 0% 4 0 1488.45529
ruby-lsp (click) 832314 801130 305 4836 24 0% 0 0 136.919485
sequel (click) 485069 408598 11 94 0 0% 0 0 3.215742
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.255984
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.272798
erubi (click) 239595 218384 5 99 0 0% 0 0 3.287733
etanni (click) 30101 29597 8 88 0 0% 0 0 2.996039
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.351069
fluentd (click) 376512 287114 7 93 0 0% 0 0 3.245553
graphql (click) 414020 370580 66 705 0 0% 0 0 20.602933
graphql-native (click) 372393 342820 37 293 0 0% 0 0 8.990156
lee (click) 288922 227877 45 799 0 0% 0 0 24.308335
matmul (click) 10810 11796 8 111 0 0% 0 0 3.621962
nbody (click) 13050 17086 6 172 0 0% 0 0 4.417483
nqueens (click) 20756 19597 5 247 0 0% 0 0 6.989391
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 101.323492
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.942571
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.39853
rack (click) 248689 219174 31 383 0 0% 0 0 10.147343
ruby-json (click) 20382 17779 8 181 0 0% 0 0 5.09847
rubyboy (click) 668702 599472 177 5886 40 0% 0 0 144.171589
rubykon (click) 135193 121132 137 1513 3 0% 0 0 43.09146
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.984824
tinygql (click) 305897 241915 58 824 5 0% 0 0 22.490015
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1445.239449
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 456.937418
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.34735
fib (click) 2599 2861 3 26 0 0% 0 0 0.969899
getivar (click) 3501 4713 3 51 0 0% 0 0 1.349107
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.556041
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.309227
object-new (click) 2301 2493 2 29 0 0% 0 0 0.964955
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.878337
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.911066
setivar (click) 2652 3389 3 31 0 0% 0 0 1.008323
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.095653
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.338669
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.102635
throw (click) 5848 4291 5 46 0 0% 0 0 1.616967

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.