Ruby Benchmarks

Details for Benchmarks at 2026-01-29 00:49:50 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.8% faster than CRuby 4.1.0dev
  • 5.6% faster than YJIT 3.4.7
On railsbench it is
  • 114.2% faster than CRuby 4.1.0dev
  • 11.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 4 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 90 5 97 50 191 50 236
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 432 50 625 50 638
liquid-compile 5 419 5 482 50 585 50 726
liquid-render 5 171 5 177 50 431 50 443
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 194 50 252 50 267
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 247 50 256
ruby-lsp 5 160 5 163 50 230 50 234
sequel 5 419 5 427 50 575 50 621
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 163 5 168 50 183 50 195
addressable-join 5 73 5 77 50 66 50 70
addressable-merge 5 160 5 156 50 222 50 219
addressable-new 5 353 5 359 50 522 50 526
addressable-normalize 5 53 5 54 50 59 50 59
addressable-parse 5 103 5 104 50 104 50 111
addressable-setters 5 184 5 182 50 230 50 231
addressable-to-s 5 163 5 169 50 184 50 193
binarytrees 5 82 5 86 50 136 50 145
blurhash 5 83 5 87 50 143 50 145
erubi 5 138 5 148 50 132 50 144
etanni 5 97 5 72 50 71 50 37
fannkuchredux 5 55 5 53 50 101 50 102
fluentd 5 56 5 66 50 20 50 32
graphql 5 372 5 468 50 573 50 931
graphql-native 5 59 5 87 50 22 50 66
knucleotide 5 163 5 162 50 117 50 116
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 246 5 282 50 679 50 705
nqueens 5 116 5 127 50 556 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 186 50 706 50 762
protoboeuf-encode 5 194 5 203 50 830 50 792
rack 5 439 5 451 50 707 50 717
ruby-json 5 82 5 100 50 46 50 73
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 164
tinygql 5 42 5 44 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 450 50 454
attr_accessor 5 157 5 211 50 1833 50 1940
cfunc_itself 5 348 5 346 50 1255 50 1259
fib 5 124 5 144 50 939 50 940
getivar 5 212 5 332 50 2315 50 2435
getivar-module 5 104 5 141 50 90 50 271
keyword_args 5 100 5 108 50 1228 50 1243
loops-times 5 23 5 26 50 64 50 61
object-new 5 268 5 378 50 298 50 719
respond_to 5 139 5 138 50 3888 50 3899
ruby-xor 5 236 5 250 50 1314 50 1284
send_bmethod 5 116 5 121 50 5538 50 4528
send_cfunc_block 5 107 5 107 50 353 50 343
send_rubyfunc_block 5 249 5 256 50 6925 50 6929
setivar 5 359 5 475 50 4923 50 5044
setivar_object 5 341 5 298 50 749 50 538
setivar_young 5 341 5 301 50 799 50 559
str_concat 5 390 5 450 50 1201 50 1128
structaref 5 156 5 201 50 1810 50 1915
structaset 5 201 5 277 50 396 50 494
throw 5 1085 5 1312 50 1410 50 1643

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) 1537573 1349169 203 2632 0 0% 0 0 74.560256
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 38.845463
erubi-rails (click) 1365188 1222922 268 3640 22 0% 0 0 96.600283
hexapdf (click) 1521511 1238354 593 15662 44 0% 0 0 433.263401
liquid-c (click) 557835 530254 114 2231 5 0% 0 0 59.578623
liquid-compile (click) 479979 448460 146 2704 2 0% 0 0 79.009334
liquid-render (click) 666126 631351 131 2950 8 0% 0 0 79.330684
lobsters (click) 8701845 7246222 3125 64119 117 0% 0 0 2107.608855
mail (click) 865915 851591 345 7700 40 0% 0 0 212.804707
psych-load (click) 288093 249195 61 829 2 0% 0 0 23.779001
railsbench (click) 3341635 2819403 1591 19678 97 0% 0 0 547.764909
rubocop (click) 5756532 4935613 3002 56848 125 0% 6 0 1659.030418
ruby-lsp (click) 1038220 907354 408 7395 47 0% 1 0 203.759997
sequel (click) 502538 389760 11 119 0 0% 0 0 3.796315
shipit (click) 7110439 6048473 3297 52006 169 0% 0 0 1719.172903
addressable-equality (click) 318615 287171 44 1414 1 0% 0 0 34.814482
addressable-getters (click) 276731 252095 26 863 0 0% 0 0 20.979136
addressable-join (click) 289500 202022 24 1005 0 0% 0 0 25.089797
addressable-merge (click) 282869 255549 27 898 0 0% 0 0 22.496059
addressable-new (click) 258981 221576 21 563 0 0% 0 0 14.075702
addressable-normalize (click) 311878 271665 43 1328 1 0% 0 0 32.684071
addressable-parse (click) 279973 262707 26 886 0 0% 0 0 22.108265
addressable-setters (click) 257162 221975 20 582 0 0% 0 0 14.51713
addressable-to-s (click) 277657 260905 26 877 0 0% 0 0 21.095649
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.747165
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.120429
erubi (click) 247776 214736 6 132 0 0% 0 0 3.842716
etanni (click) 32382 26816 8 111 0 0% 0 0 3.468689
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.002332
fluentd (click) 483506 440884 7 115 0 0% 0 0 3.695036
graphql (click) 408576 383602 73 1895 19 1% 0 0 53.490629
graphql-native (click) 352959 325466 39 532 0 0% 0 0 13.979158
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.851138
lee (click) 316935 287050 49 1088 0 0% 0 0 31.141352
matmul (click) 11103 4709 8 136 0 0% 0 0 4.204414
nbody (click) 14448 21176 6 251 0 0% 0 0 6.137136
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.297579
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 110.802793
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.161868
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.244649
rack (click) 279513 263788 35 580 0 0% 0 0 15.204005
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.739906
rubyboy (click) 704862 663382 154 6869 42 0% 0 0 167.372266
rubykon (click) 147478 130977 137 2088 3 0% 0 0 56.252924
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.040163
tinygql (click) 296377 251654 59 1031 5 0% 0 0 26.877793
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1946.518895
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.125187
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.086724
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.506677
fib (click) 2659 2995 3 30 0 0% 0 0 1.129082
getivar (click) 3789 6778 3 79 0 0% 0 0 1.920264
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.294126
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.822032
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.89354
object-new (click) 2406 2818 2 36 0 0% 0 0 1.021437
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.144723
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.773015
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.801003
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.120087
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.443819
setivar (click) 2783 3726 3 46 0 0% 0 0 1.280391
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.425462
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.727958
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.442527
structaref (click) 4407 9095 3 88 0 0% 0 0 2.343875
structaset (click) 4113 5834 3 70 0 0% 0 0 1.767452
throw (click) 5953 4624 5 53 0 0% 0 0 1.77122

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.