YJIT Benchmarks

Details for Benchmarks at 2025-06-04 03:54:50 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.6% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
On railsbench it is
  • 101.3% faster than CRuby 3.5.0dev
  • 6.0% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 26 minutes
aarch64 runtime: 3 hours, 48 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 83 50 157 50 172
chunky-png 5 31 5 31 50 15 50 26
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 421 50 584 50 622
liquid-compile 5 406 5 465 50 539 50 695
liquid-render 5 169 5 171 50 403 50 421
lobsters 5 19 5 19 50 10 50 10
mail 5 194 5 184 50 249 50 225
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 248 50 258
ruby-lsp 5 159 5 160 50 246 50 263
sequel 5 415 5 418 50 599 50 583
binarytrees 5 84 5 80 50 146 50 132
blurhash 5 82 5 85 50 127 50 145
erubi 5 125 5 142 50 86 50 150
etanni 5 91 5 100 50 53 50 69
fannkuchredux 5 52 5 57 50 98 50 103
fluentd 5 63 5 62 50 24 50 27
graphql 5 85 5 84 50 58 50 57
graphql-native 5 40 5 54 50 11 50 16
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 88 50 92
nbody 5 249 5 251 50 585 50 624
nqueens 5 120 5 126 50 75 50 527
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 184 50 621 50 718
protoboeuf-encode 5 178 5 193 50 326 50 797
rack 5 587 5 633 50 958 50 1056
ruby-json 5 84 5 83 50 49 50 48
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 51 50 163 50 151
tinygql 5 36 5 39 50 23 50 34
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 38 50 480 50 471
cfunc_itself 5 357 5 347 50 1137 50 1258
fib 5 127 5 137 50 902 50 931
getivar 5 214 5 326 50 2253 50 2402
keyword_args 5 104 5 111 50 1034 50 1243
loops-times 5 24 5 26 50 48 50 53
object-new 5 322 5 355 50 405 50 577
respond_to 5 132 5 133 50 3256 50 3898
ruby-xor 5 245 5 237 50 799 50 1296
setivar 5 361 5 433 50 3191 50 4987
setivar_object 5 354 5 410 50 670 50 623
setivar_young 5 367 5 411 50 703 50 660
str_concat 5 402 5 450 50 978 50 1189
throw 5 1270 5 1289 50 1720 50 1694

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) 1520357 1274529 206 2590 0 0% 0 0 80.31269
chunky-png (click) 335463 302119 74 1330 1 0% 0 0 39.267792
erubi-rails (click) 1990983 1810602 263 3640 21 0% 0 0 101.573467
hexapdf (click) 1517664 1342772 594 15611 40 0% 0 0 454.047041
liquid-c (click) 530703 533277 114 2213 5 0% 0 0 62.109248
liquid-compile (click) 429203 389012 146 2687 2 0% 0 0 82.36645
liquid-render (click) 640324 569410 131 2933 8 0% 0 0 81.58487
lobsters (click) 8530192 7084087 3171 63704 118 0% 0 0 2155.418063
mail (click) 823876 757111 342 7227 40 0% 0 0 210.580511
psych-load (click) 290953 274072 61 825 3 0% 0 0 24.901216
railsbench (click) 3393422 3059664 1653 20166 56 0% 0 0 583.779401
rubocop (click) 5926187 5002212 2885 61745 113 0% 4 0 1819.632815
ruby-lsp (click) 854989 801291 305 5956 29 0% 0 0 164.224857
sequel (click) 478127 419869 11 114 0 0% 0 0 4.093537
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.616698
blurhash (click) 52289 51444 27 603 0 0% 0 0 18.249459
erubi (click) 269691 227172 5 125 0 0% 0 0 3.892889
etanni (click) 30806 32125 8 108 0 0% 0 0 3.53472
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.188794
fluentd (click) 388581 300676 7 115 0 0% 0 0 3.80855
graphql (click) 459931 421987 66 1035 0 0% 0 0 28.610642
graphql-native (click) 413642 388100 37 399 0 0% 0 0 11.484847
lee (click) 316999 284297 45 1012 0 0% 0 0 30.742608
matmul (click) 11125 4603 8 132 0 0% 0 0 4.243921
nbody (click) 13890 20235 6 238 0 0% 0 0 5.900133
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.402334
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.969841
protoboeuf (click) 170142 177773 12 2836 0 0% 0 0 75.595371
protoboeuf-encode (click) 243031 283791 14 1815 0 0% 0 0 47.145414
rack (click) 276698 230548 31 496 0 0% 0 0 13.378458
ruby-json (click) 20449 18419 8 204 0 0% 0 0 5.79757
rubyboy (click) 728193 655970 177 6919 40 0% 0 0 177.873239
rubykon (click) 145853 169867 137 2066 3 0% 0 0 57.593505
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.272403
tinygql (click) 316988 277580 58 977 5 0% 0 0 27.592923
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1979.976015
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 496.90563
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.540092
fib (click) 2659 2995 3 30 0 0% 0 0 1.076316
getivar (click) 3812 6802 3 78 0 0% 0 0 1.928262
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.793899
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.769816
object-new (click) 2406 2818 2 36 0 0% 0 0 1.127525
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.099686
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.706521
setivar (click) 2783 3726 3 46 0 0% 0 0 1.257003
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.394886
setivar_young (click) 4297 4867 4 63 0 0% 0 0 1.682489
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.618358
throw (click) 5953 4624 5 53 0 0% 0 0 1.852121

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.