Ruby Benchmarks

Details for Benchmarks at 2025-11-11 00:40:20 UTC

YJIT metrics from the ruby-bench suite using Ruby 87493e32ed.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 88.5% faster than CRuby 4.0.0dev
  • 2.7% slower than YJIT 3.4.7
On railsbench it is
  • 105.3% faster than CRuby 4.0.0dev
  • 2.6% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 25 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.4.7 warmups CRuby 3.4.7 iters CRuby 4.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 83 5 87 50 194 50 224
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 391 50 623 50 527
liquid-compile 5 416 5 459 50 556 50 713
liquid-render 5 171 5 163 50 433 50 375
lobsters 5 19 5 20 50 10 50 10
mail 5 194 5 162 50 254 50 146
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 156 50 248 50 244
ruby-lsp 5 142 5 146 50 240 50 239
sequel 5 422 5 425 50 584 50 571
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 83 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 135 5 133 50 135 50 127
etanni 5 98 5 66 50 72 50 30
fannkuchredux 5 55 5 55 50 102 50 97
fluentd 5 56 5 57 50 29 50 27
graphql 5 375 5 455 50 574 50 909
graphql-native 5 59 5 81 50 23 50 61
knucleotide 5 162 5 155 50 117 50 109
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 50 50 94 50 89
nbody 5 246 5 262 50 676 50 647
nqueens 5 116 5 129 50 556 50 556
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 174 50 706 50 658
protoboeuf-encode 5 197 5 196 50 833 50 800
rack 5 438 5 437 50 712 50 679
ruby-json 5 82 5 93 50 46 50 63
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 157 50 148
tinygql 5 41 5 43 50 40 50 46
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 454 50 458
attr_accessor 5 157 5 205 50 1835 50 1933
cfunc_itself 5 348 5 349 50 1255 50 1259
fib 5 124 5 143 50 939 50 940
getivar 5 215 5 288 50 2312 50 2400
keyword_args 5 99 5 105 50 1240 50 1243
loops-times 5 23 5 25 50 64 50 57
object-new 5 269 5 356 50 297 50 601
respond_to 5 139 5 130 50 3888 50 3904
ruby-xor 5 237 5 248 50 1315 50 1276
send_bmethod 5 116 5 115 50 5538 50 5537
send_cfunc_block 5 106 5 105 50 353 50 340
send_rubyfunc_block 5 250 5 256 50 6923 50 6922
setivar 5 360 5 346 50 4923 50 4921
setivar_object 5 341 5 332 50 754 50 580
setivar_young 5 341 5 332 50 797 50 612
str_concat 5 391 5 388 50 1200 50 1017
structaref 5 157 5 189 50 1812 50 1883
throw 5 1086 5 1253 50 1418 50 1577

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) 1550462 1315640 205 2579 0 0% 0 0 73.091156
chunky-png (click) 317323 243425 74 1322 1 0% 0 0 37.414793
erubi-rails (click) 1376040 1212579 267 3671 22 0% 0 0 98.240135
hexapdf (click) 1525822 1400123 593 15678 44 0% 0 0 437.211729
liquid-c (click) 556399 479837 114 2228 5 0% 0 0 59.700811
liquid-compile (click) 480623 458053 146 2735 2 0% 0 0 79.764697
liquid-render (click) 662715 611665 131 2946 8 0% 0 0 80.116289
lobsters (click) 8518136 7210412 3102 62390 120 0% 0 0 2116.849369
mail (click) 866453 819332 342 7696 40 0% 0 0 214.780614
psych-load (click) 288659 266872 61 832 2 0% 0 0 23.836573
railsbench (click) 3358061 2829098 1605 19599 47 0% 0 0 549.839636
rubocop (click) 5760197 4941296 3001 56852 126 0% 6 0 1785.152438
ruby-lsp (click) 963473 883850 347 6784 44 0% 1 0 183.125168
sequel (click) 503148 464725 11 119 0 0% 0 0 4.002852
shipit (click) 7738118 6572576 3345 53489 181 0% 1 0 1765.694327
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.872093
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.808157
erubi (click) 248224 199188 6 134 0 0% 0 0 3.997814
etanni (click) 32930 35718 8 114 0 0% 0 0 3.636029
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.940918
fluentd (click) 491584 426893 7 115 0 0% 0 0 3.693621
graphql (click) 410388 353818 73 1921 19 0% 0 0 54.579914
graphql-native (click) 354457 254425 39 532 0 0% 0 0 14.416809
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.010438
lee (click) 306114 300459 49 1097 0 0% 0 0 31.753428
matmul (click) 11103 4709 8 136 0 0% 0 0 4.252515
nbody (click) 14448 21176 6 251 0 0% 0 0 6.187894
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.295259
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.789801
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.906209
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.633856
rack (click) 281408 241496 35 580 0 0% 0 0 15.035271
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.651871
rubyboy (click) 704137 671523 154 6868 42 0% 0 0 167.297622
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.483733
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.306947
tinygql (click) 301179 247831 59 1037 5 0% 0 0 27.250091
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1939.63699
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.814108
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.097249
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.525373
fib (click) 2659 2995 3 30 0 0% 0 0 1.167458
getivar (click) 3789 6778 3 79 0 0% 0 0 1.981675
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.856245
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.919734
object-new (click) 2406 2818 2 36 0 0% 0 0 1.11546
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.136231
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.856618
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.758993
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.303754
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.462491
setivar (click) 2783 3726 3 46 0 0% 0 0 1.287791
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.467374
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.757758
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.511186
structaref (click) 4407 9095 3 88 0 0% 0 0 2.366809
throw (click) 5953 4624 5 53 0 0% 0 0 1.815895

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.