Ruby Benchmarks

Details for Benchmarks at 2026-03-08 00:53:07 UTC

YJIT metrics from the ruby-bench suite using Ruby 66e61d0cff.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.6% faster than CRuby 4.1.0dev
  • 6.3% faster than YJIT 3.4.7
On railsbench it is
  • 113.2% faster than CRuby 4.1.0dev
  • 11.4% faster than YJIT 3.4.7
x86_64 runtime: 10 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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.1.0dev warmups CRuby 4.1.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.1.0dev warmups YJIT 4.1.0dev iters
activerecord 5 93 5 99 50 200 50 239
chunky-png 5 31 5 32 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 432 50 629 50 641
liquid-compile 5 418 5 480 50 581 50 729
liquid-render 5 172 5 175 50 437 50 452
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 198 50 252 50 277
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 246 50 253
ruby-lsp 5 155 5 163 50 214 50 236
sequel 5 427 5 439 50 584 50 614
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 13
addressable-getters 5 163 5 171 50 183 50 198
addressable-join 5 72 5 80 50 63 50 76
addressable-merge 5 160 5 161 50 222 50 228
addressable-new 5 351 5 356 50 523 50 524
addressable-normalize 5 53 5 55 50 59 50 62
addressable-parse 5 103 5 106 50 104 50 113
addressable-setters 5 184 5 191 50 229 50 242
addressable-to-s 5 163 5 170 50 182 50 199
binarytrees 5 82 5 86 50 136 50 147
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 152 50 126 50 153
etanni 5 98 5 74 50 72 50 44
fannkuchredux 5 55 5 49 50 102 50 90
fluentd 5 56 5 66 50 20 50 34
gcbench 5 10 5 10 50 10 50 10
graphql 5 373 5 472 50 576 50 920
graphql-native 5 58 5 89 50 23 50 69
knucleotide 5 163 5 160 50 118 50 113
lee 5 23 5 31 50 10 50 11
matmul 5 51 5 50 50 94 50 98
nbody 5 247 5 274 50 676 50 702
nqueens 5 116 5 124 50 557 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 182 50 706 50 777
protoboeuf-encode 5 195 5 205 50 834 50 793
rack 5 439 5 457 50 707 50 734
ruby-json 5 82 5 100 50 47 50 74
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 233 50 245 50 288
sudoku 5 48 5 49 50 156 50 166
tinygql 5 39 5 44 50 40 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 39 5 40 50 453 50 454
attr_accessor 5 157 5 199 50 1836 50 1920
cfunc_itself 5 349 5 358 50 1255 50 1259
fib 5 124 5 144 50 939 50 940
getivar 5 214 5 287 50 2314 50 2400
getivar-module 5 104 5 121 50 90 50 258
keyword_args 5 100 5 103 50 1240 50 1242
loops-times 5 23 5 24 50 64 50 62
object-new 5 268 5 420 50 297 50 928
object-new-initialize 5 169 5 246 50 259 50 748
object-new-no-escape 5 81 5 131 50 89 50 376
respond_to 5 139 5 139 50 3888 50 3904
ruby-xor 5 236 5 255 50 1313 50 1298
send_bmethod 5 116 5 121 50 5539 50 4526
send_cfunc_block 5 105 5 107 50 353 50 382
send_rubyfunc_block 5 251 5 249 50 6923 50 6918
setivar 5 359 5 443 50 4926 50 5015
setivar_object 5 341 5 306 50 752 50 633
setivar_young 5 341 5 309 50 796 50 663
str_concat 5 392 5 440 50 1200 50 1173
structaref 5 156 5 200 50 1811 50 1897
structaset 5 202 5 258 50 396 50 499
throw 5 1090 5 1379 50 1423 50 1815

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) 1553309 1333906 203 2653 0 0% 0 0 74.660742
chunky-png (click) 321334 279547 79 1376 1 0% 0 0 38.899262
erubi-rails (click) 1375530 1164436 268 3648 22 0% 0 0 97.886193
hexapdf (click) 1512299 1331116 593 15706 44 0% 0 0 434.988344
liquid-c (click) 558452 463323 114 2236 5 0% 0 0 59.236877
liquid-compile (click) 473600 404725 146 2762 2 0% 0 0 80.827905
liquid-render (click) 665450 595583 131 2959 8 0% 0 0 78.466675
lobsters (click) 8682678 7348454 3124 64029 122 0% 0 0 2098.210573
mail (click) 871689 838818 345 7728 40 0% 0 0 212.801133
psych-load (click) 288632 265521 61 831 2 0% 0 0 24.126966
railsbench (click) 3356465 2783223 1592 19777 97 0% 0 0 549.785715
rubocop (click) 5789778 5088167 3002 57190 125 0% 6 0 1659.821572
ruby-lsp (click) 1042998 921533 408 7446 46 0% 1 0 203.472366
sequel (click) 503303 438631 11 119 0 0% 0 0 3.874045
shipit (click) 7273521 6267710 3381 53881 168 0% 1 0 1762.154145
addressable-equality (click) 317455 268825 44 1382 1 0% 0 0 34.250647
addressable-getters (click) 277719 236271 26 863 0 0% 0 0 20.908938
addressable-join (click) 282997 228261 24 941 0 0% 0 0 23.491358
addressable-merge (click) 283188 231030 27 898 0 0% 0 0 22.003658
addressable-new (click) 257859 203751 21 563 0 0% 0 0 13.954897
addressable-normalize (click) 315006 266213 43 1362 1 0% 0 0 33.483735
addressable-parse (click) 280340 229835 26 880 0 0% 0 0 21.803352
addressable-setters (click) 258054 206032 20 582 0 0% 0 0 14.404127
addressable-to-s (click) 277327 243417 26 849 0 0% 0 0 20.574086
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.839796
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.240965
erubi (click) 247937 229861 6 134 0 0% 0 0 3.884957
etanni (click) 32951 34772 8 114 0 0% 0 0 3.459111
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.027612
fluentd (click) 487629 444151 7 116 0 0% 0 0 3.71828
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.526957
graphql (click) 409996 365746 73 1909 19 0% 0 0 52.886068
graphql-native (click) 354469 299522 39 532 0 0% 0 0 14.164933
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.683072
lee (click) 317972 245222 49 1099 0 0% 0 0 31.325665
matmul (click) 11103 4709 8 136 0 0% 0 0 4.233342
nbody (click) 14448 21176 6 251 0 0% 0 0 6.277662
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.372887
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.289033
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.752329
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.889304
rack (click) 286814 223329 35 628 0 0% 0 0 16.175984
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.800951
rubyboy (click) 705156 614597 154 6873 42 0% 0 0 166.591461
rubykon (click) 149667 148880 138 2117 4 0% 0 0 57.094264
splay (click) 34953 22682 9 175 0 0% 0 0 5.315641
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.153663
tinygql (click) 300483 279308 59 1025 5 0% 0 0 27.24112
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1934.490746
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.137007
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.118544
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.555847
fib (click) 2659 2995 3 30 0 0% 0 0 1.113299
getivar (click) 3789 6778 3 79 0 0% 0 0 1.962071
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.37968
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.853611
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.947594
object-new (click) 2406 2818 2 36 0 0% 0 0 1.107161
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.335374
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.998243
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.169329
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.852611
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.841128
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.870452
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.499414
setivar (click) 2783 3726 3 46 0 0% 0 0 1.30143
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.44246
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.739977
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.472212
structaref (click) 4407 9095 3 88 0 0% 0 0 2.398791
structaset (click) 4113 5834 3 70 0 0% 0 0 1.829649
throw (click) 5953 4624 5 53 0 0% 0 0 1.800206

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.