Ruby Benchmarks

Details for Benchmarks at 2025-11-24 00:43:00 UTC

YJIT metrics from the ruby-bench suite using Ruby b75cf83a33.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 87.9% faster than CRuby 4.0.0dev
  • 2.0% slower than YJIT 3.4.7
On railsbench it is
  • 98.1% faster than CRuby 4.0.0dev
  • 1.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 7 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 84 5 84 50 201 50 201
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 391 50 629 50 557
liquid-compile 5 418 5 464 50 546 50 715
liquid-render 5 172 5 162 50 412 50 355
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 177 50 252 50 155
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 247 50 250
ruby-lsp 5 140 5 147 50 239 50 245
sequel 5 421 5 438 50 583 50 601
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 164 5 161 50 184 50 184
addressable-join 5 72 5 51 50 63 50 18
addressable-merge 5 161 5 150 50 222 50 208
addressable-new 5 353 5 331 50 524 50 489
addressable-normalize 5 54 5 52 50 59 50 56
addressable-parse 5 103 5 99 50 104 50 102
addressable-setters 5 184 5 175 50 228 50 219
addressable-to-s 5 164 5 160 50 183 50 184
binarytrees 5 82 5 83 50 136 50 129
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 137 50 131 50 125
etanni 5 97 5 69 50 72 50 34
fannkuchredux 5 54 5 54 50 102 50 95
fluentd 5 56 5 58 50 28 50 29
graphql 5 373 5 433 50 566 50 916
graphql-native 5 58 5 78 50 22 50 61
knucleotide 5 163 5 165 50 118 50 119
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 52 50 95 50 91
nbody 5 247 5 259 50 677 50 645
nqueens 5 116 5 119 50 557 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 185 50 706 50 768
protoboeuf-encode 5 198 5 205 50 832 50 804
rack 5 438 5 434 50 724 50 700
ruby-json 5 84 5 98 50 47 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 157 50 152
tinygql 5 42 5 42 50 35 50 48
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 456 50 445
attr_accessor 5 158 5 211 50 1836 50 1944
cfunc_itself 5 347 5 355 50 1255 50 1259
fib 5 123 5 144 50 939 50 939
getivar 5 216 5 303 50 2313 50 2408
keyword_args 5 100 5 105 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 55
object-new 5 268 5 314 50 297 50 464
respond_to 5 139 5 130 50 3887 50 3905
ruby-xor 5 237 5 255 50 1314 50 1289
send_bmethod 5 116 5 123 50 5538 50 5541
send_cfunc_block 5 105 5 100 50 353 50 333
send_rubyfunc_block 5 251 5 255 50 6924 50 6923
setivar 5 360 5 368 50 4926 50 4945
setivar_object 5 341 5 324 50 750 50 571
setivar_young 5 341 5 328 50 796 50 592
str_concat 5 387 5 431 50 1201 50 1184
structaref 5 157 5 210 50 1809 50 1915
structaset 5 202 5 219 50 397 50 353
throw 5 1086 5 1142 50 1404 50 1394

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) 1549541 1331960 205 2579 0 0% 0 0 73.662668
chunky-png (click) 321646 264377 79 1381 1 0% 0 0 38.929324
erubi-rails (click) 1375239 1244526 267 3661 22 0% 0 0 97.360083
hexapdf (click) 1522450 1272910 593 15682 44 0% 0 0 436.521014
liquid-c (click) 556566 512614 114 2228 5 0% 0 0 59.99557
liquid-compile (click) 479234 439783 146 2704 2 0% 0 0 78.598018
liquid-render (click) 659290 599184 131 2946 8 0% 0 0 79.727075
lobsters (click) 8542692 7216208 3102 62580 118 0% 0 0 2171.827983
mail (click) 861656 863890 342 7700 40 0% 0 0 211.67396
psych-load (click) 289049 259041 61 832 2 0% 0 0 23.563517
railsbench (click) 3359861 2759570 1605 19586 47 0% 0 0 546.150889
rubocop (click) 5762105 4950547 3001 56864 127 0% 6 0 1656.009095
ruby-lsp (click) 959219 871650 343 6729 45 0% 1 0 182.129648
sequel (click) 502607 415250 11 119 0 0% 0 0 3.945839
shipit (click) 7861211 6556338 3399 55347 186 0% 1 0 1811.004526
addressable-equality (click) 318045 278586 44 1381 1 0% 0 0 33.722879
addressable-getters (click) 278395 221341 26 863 0 0% 0 0 20.750781
addressable-join (click) 283585 270552 24 941 0 0% 0 0 23.338649
addressable-merge (click) 273526 220732 27 896 0 0% 0 0 22.17148
addressable-new (click) 261659 247801 21 563 0 0% 0 0 13.977096
addressable-normalize (click) 313387 298141 43 1328 1 0% 0 0 32.600967
addressable-parse (click) 282093 240466 26 882 0 0% 0 0 21.71882
addressable-setters (click) 260018 233181 20 582 0 0% 0 0 14.357296
addressable-to-s (click) 278828 220955 26 849 0 0% 0 0 20.642102
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.849239
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.970563
erubi (click) 248547 207683 6 134 0 0% 0 0 3.991812
etanni (click) 32930 35718 8 114 0 0% 0 0 3.592937
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.999697
fluentd (click) 488623 439477 7 115 0 0% 0 0 3.757746
graphql (click) 410784 378618 73 1921 19 0% 0 0 53.851666
graphql-native (click) 355239 279675 39 532 0 0% 0 0 13.598973
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.803234
lee (click) 318984 314252 49 1097 0 0% 0 0 31.460795
matmul (click) 11103 4709 8 136 0 0% 0 0 4.211157
nbody (click) 14448 21176 6 251 0 0% 0 0 6.124525
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.369531
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.753833
protoboeuf (click) 170129 251445 12 2837 0 0% 0 0 72.362221
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.180799
rack (click) 281460 249537 35 580 0 0% 0 0 15.042722
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.691647
rubyboy (click) 704051 630377 154 6862 42 0% 0 0 166.20131
rubykon (click) 146229 153926 137 2070 3 0% 0 0 56.251396
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.644683
tinygql (click) 297290 275932 59 1031 5 0% 0 0 27.086769
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1922.55287
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.002192
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.108849
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.542529
fib (click) 2659 2995 3 30 0 0% 0 0 1.160827
getivar (click) 3789 6778 3 79 0 0% 0 0 1.975762
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.829749
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.946235
object-new (click) 2406 2818 2 36 0 0% 0 0 1.163561
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.148371
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.875526
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.753311
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.281985
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.502965
setivar (click) 2783 3726 3 46 0 0% 0 0 1.269543
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.388138
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.746767
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.452351
structaref (click) 4407 9095 3 88 0 0% 0 0 2.336655
structaset (click) 3926 5614 3 70 0 0% 0 0 1.738468
throw (click) 5953 4624 5 53 0 0% 0 0 1.875717

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.