YJIT Benchmarks

Details for Benchmarks at 2025-05-27 03:53:00 UTC

YJIT metrics from the yjit-bench suite using Ruby 061d36476f.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 87.9% faster than CRuby 3.5.0dev
  • 6.5% faster than YJIT 3.3.6
On railsbench it is
  • 97.8% faster than CRuby 3.5.0dev
  • 3.7% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 26 minutes
aarch64 runtime: 3 hours, 44 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 80 50 156 50 158
chunky-png 5 31 5 33 50 14 50 23
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 416 5 422 50 586 50 605
liquid-compile 5 407 5 461 50 539 50 698
liquid-render 5 170 5 171 50 402 50 441
lobsters 5 20 5 19 50 10 50 10
mail 5 195 5 176 50 241 50 202
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 249 50 254
ruby-lsp 5 161 5 155 50 204 50 270
sequel 5 415 5 425 50 588 50 584
binarytrees 5 84 5 84 50 146 50 134
blurhash 5 82 5 87 50 127 50 145
erubi 5 120 5 144 50 98 50 143
etanni 5 91 5 98 50 53 50 66
fannkuchredux 5 52 5 57 50 97 50 107
fluentd 5 63 5 63 50 25 50 27
graphql 5 85 5 85 50 57 50 58
graphql-native 5 50 5 54 50 10 50 17
lee 5 22 5 24 50 10 50 10
matmul 5 51 5 53 50 88 50 98
nbody 5 249 5 256 50 585 50 685
nqueens 5 120 5 125 50 75 50 550
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 181 50 620 50 723
protoboeuf-encode 5 178 5 180 50 325 50 785
rack 5 572 5 624 50 963 50 1053
ruby-json 5 83 5 82 50 50 50 48
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 51 50 163 50 158
tinygql 5 35 5 37 50 23 50 32
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 38 50 480 50 470
cfunc_itself 5 358 5 369 50 1147 50 1258
fib 5 118 5 141 50 902 50 931
getivar 5 213 5 304 50 2246 50 2391
keyword_args 5 104 5 109 50 1041 50 1243
loops-times 5 24 5 28 50 47 50 62
object-new 5 322 5 352 50 404 50 533
respond_to 5 132 5 136 50 3258 50 3908
ruby-xor 5 246 5 256 50 799 50 1296
setivar 5 361 5 627 50 3189 50 5097
setivar_object 5 353 5 444 50 671 50 684
setivar_young 5 367 5 445 50 702 50 721
str_concat 5 400 5 471 50 979 50 1132
throw 5 1271 5 1309 50 1715 50 1726

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT warms up fairly quickly, while some JITs may start slower as they do more advanced compilation.

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) 1494048 1324839 206 2590 0 0% 0 0 80.187464
chunky-png (click) 296111 292724 74 1322 1 0% 0 0 38.416667
erubi-rails (click) 1959801 1750719 263 3681 21 0% 0 0 101.716059
hexapdf (click) 1518898 1335267 593 15617 40 0% 0 0 457.65879
liquid-c (click) 530140 517498 114 2217 5 0% 0 0 61.084088
liquid-compile (click) 415048 395006 146 2683 2 0% 0 0 78.527436
liquid-render (click) 600272 535706 131 2933 8 0% 0 0 80.822782
lobsters (click) 8543430 7185183 3171 63936 118 0% 0 0 2139.138974
mail (click) 792041 727001 342 7227 40 0% 0 0 205.007134
psych-load (click) 267360 253459 61 825 3 0% 0 0 24.459089
railsbench (click) 3396818 2982138 1653 20178 56 0% 0 0 573.983564
rubocop (click) 5891754 4865067 2885 61731 113 0% 4 0 1782.831044
ruby-lsp (click) 855041 804747 305 5956 29 0% 0 0 162.936295
sequel (click) 508144 453447 11 116 0 0% 0 0 3.907173
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.622323
blurhash (click) 52289 51444 27 603 0 0% 0 0 18.26461
erubi (click) 269835 226997 5 125 0 0% 0 0 3.88869
etanni (click) 30806 32125 8 108 0 0% 0 0 3.542617
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.043285
fluentd (click) 393806 345109 7 115 0 0% 0 0 3.761932
graphql (click) 431483 396750 66 1035 0 0% 0 0 28.975766
graphql-native (click) 378360 325863 37 399 0 0% 0 0 11.943172
lee (click) 282387 229921 45 1012 0 0% 0 0 30.263539
matmul (click) 11125 4603 8 132 0 0% 0 0 4.211997
nbody (click) 13890 20235 6 238 0 0% 0 0 5.826696
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.379761
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.549205
protoboeuf (click) 170142 177773 12 2836 0 0% 0 0 75.652309
protoboeuf-encode (click) 243031 283791 14 1815 0 0% 0 0 47.087556
rack (click) 282543 251148 31 496 0 0% 0 0 13.054088
ruby-json (click) 24634 22156 8 204 0 0% 0 0 5.818716
rubyboy (click) 727386 681134 177 6963 40 0% 0 0 179.621297
rubykon (click) 145853 169867 137 2066 3 0% 0 0 57.151276
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.046084
tinygql (click) 287997 253001 58 977 5 0% 0 0 27.350583
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1963.429216
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 492.255325
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.485201
fib (click) 2659 2995 3 30 0 0% 0 0 1.064218
getivar (click) 3812 6802 3 78 0 0% 0 0 1.888561
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.775452
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.790127
object-new (click) 2406 2818 2 36 0 0% 0 0 1.104627
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.085634
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.701017
setivar (click) 2783 3726 3 46 0 0% 0 0 1.247972
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.384828
setivar_young (click) 4297 4867 4 63 0 0% 0 0 1.665139
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.468704
throw (click) 5953 4624 5 53 0 0% 0 0 1.829722

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.