Ruby Benchmarks

Details for Benchmarks at 2026-03-26 00:57:25 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.5% faster than CRuby 4.1.0dev
  • 7.0% faster than YJIT 3.4.7
On railsbench it is
  • 113.5% faster than CRuby 4.1.0dev
  • 15.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 40 minutes
aarch64 runtime: 7 hours, 30 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 199 50 242
chunky-png 5 32 5 33 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 436 50 619 50 649
liquid-compile 5 421 5 481 50 583 50 716
liquid-render 5 171 5 178 50 430 50 451
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 193 50 254 50 278
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 162 50 241 50 241
sequel 5 425 5 444 50 592 50 623
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 28 50 12 50 13
addressable-getters 5 165 5 172 50 183 50 203
addressable-join 5 74 5 78 50 66 50 76
addressable-merge 5 160 5 159 50 224 50 225
addressable-new 5 352 5 335 50 521 50 532
addressable-normalize 5 53 5 55 50 60 50 63
addressable-parse 5 104 5 106 50 103 50 112
addressable-setters 5 185 5 187 50 235 50 236
addressable-to-s 5 163 5 173 50 183 50 205
binarytrees 5 82 5 89 50 136 50 160
blurhash 5 83 5 87 50 145 50 145
erubi 5 139 5 151 50 139 50 159
etanni 5 100 5 76 50 72 50 43
fannkuchredux 5 55 5 56 50 100 50 107
fluentd 5 62 5 65 50 21 50 31
gcbench 5 10 5 10 50 10 50 10
graphql 5 367 5 473 50 576 50 939
graphql-native 5 59 5 89 50 21 50 70
knucleotide 5 163 5 160 50 118 50 114
lee 5 22 5 30 50 10 50 12
matmul 5 53 5 54 50 87 50 97
nbody 5 250 5 286 50 663 50 705
nqueens 5 119 5 126 50 554 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 697 50 808
protoboeuf-encode 5 201 5 207 50 799 50 797
rack 5 437 5 463 50 710 50 734
ruby-json 5 84 5 102 50 50 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 235 50 250 50 290
sudoku 5 48 5 49 50 155 50 167
tinygql 5 41 5 44 50 41 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 445 50 454
attr_accessor 5 156 5 176 50 1834 50 1883
cfunc_itself 5 346 5 351 50 1255 50 1259
fib 5 125 5 144 50 939 50 939
getivar 5 215 5 321 50 2314 50 2431
getivar-module 5 103 5 136 50 89 50 249
keyword_args 5 102 5 106 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 418 50 298 50 979
object-new-initialize 5 168 5 245 50 260 50 782
object-new-no-escape 5 80 5 131 50 89 50 380
respond_to 5 139 5 128 50 3906 50 3901
ruby-xor 5 247 5 257 50 1305 50 1301
send_bmethod 5 118 5 123 50 5539 50 4526
send_cfunc_block 5 106 5 101 50 354 50 380
send_rubyfunc_block 5 242 5 251 50 6920 50 6922
setivar 5 359 5 484 50 4929 50 5046
setivar_object 5 341 5 306 50 759 50 595
setivar_young 5 341 5 309 50 808 50 619
str_concat 5 391 5 455 50 1204 50 1206
structaref 5 153 5 183 50 1797 50 1867
structaset 5 198 5 264 50 370 50 491
throw 5 1111 5 1452 50 1443 50 1875

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) 1558817 1339649 204 2678 0 0% 0 0 74.130153
chunky-png (click) 324309 265531 79 1376 1 0% 0 0 38.576759
erubi-rails (click) 1376876 1221344 268 3626 22 0% 0 0 93.668514
hexapdf (click) 1529368 1291653 593 15710 44 0% 0 0 425.613944
liquid-c (click) 559466 511695 114 2236 5 0% 0 0 57.556488
liquid-compile (click) 483210 424499 146 2704 2 0% 0 0 76.494072
liquid-render (click) 668474 638591 131 2959 8 0% 0 0 77.449313
lobsters (click) 8688408 7503804 3126 64259 120 0% 0 0 2053.769411
mail (click) 874894 833352 345 7728 40 0% 0 0 208.910659
psych-load (click) 291610 243304 61 831 2 0% 0 0 23.596021
railsbench (click) 3361648 2951135 1592 19824 97 0% 0 0 537.522035
rubocop (click) 5784122 5105009 3002 57095 126 0% 6 0 1614.509841
ruby-lsp (click) 1045002 873787 408 7436 46 0% 1 0 198.283817
sequel (click) 506808 458092 11 119 0 0% 0 0 3.934961
shipit (click) 6912845 5750218 3137 50514 143 0% 0 0 1600.668715
addressable-equality (click) 323409 315460 44 1406 1 0% 0 0 33.609347
addressable-getters (click) 277539 259604 26 863 0 0% 0 0 20.463027
addressable-join (click) 287498 265598 24 1005 0 0% 0 0 24.855967
addressable-merge (click) 283105 270866 27 898 0 0% 0 0 21.930477
addressable-new (click) 259243 245398 21 591 0 0% 0 0 14.289248
addressable-normalize (click) 316047 282833 43 1327 1 0% 0 0 31.946869
addressable-parse (click) 280347 237017 26 880 0 0% 0 0 21.124176
addressable-setters (click) 261401 241598 20 582 0 0% 0 0 14.198901
addressable-to-s (click) 280304 237681 26 849 0 0% 0 0 20.269142
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.788766
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.876507
erubi (click) 250912 191269 6 134 0 0% 0 0 3.801712
etanni (click) 32731 34499 8 114 0 0% 0 0 3.430211
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.900664
fluentd (click) 491207 438973 7 116 0 0% 0 0 3.658167
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.417293
graphql (click) 410125 364833 73 1909 19 0% 0 0 52.141091
graphql-native (click) 339176 320697 39 532 0 0% 0 0 13.711318
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.699947
lee (click) 302234 265939 49 1099 0 0% 0 0 30.690352
matmul (click) 11103 4709 8 136 0 0% 0 0 4.185176
nbody (click) 14448 21176 6 251 0 0% 0 0 6.182221
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.217487
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.021678
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.5446
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.965536
rack (click) 287229 270734 35 586 0 0% 0 0 15.187755
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.760703
rubyboy (click) 708036 631171 154 6871 42 0% 0 0 163.301978
rubykon (click) 148683 164130 138 2104 4 0% 0 0 55.069605
splay (click) 34953 22682 9 175 0 0% 0 0 5.180274
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.652759
tinygql (click) 303708 273666 59 1031 5 0% 0 0 26.707369
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1868.140825
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.675489
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.069093
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.501696
fib (click) 2659 2995 3 30 0 0% 0 0 1.107219
getivar (click) 3789 6778 3 79 0 0% 0 0 1.931739
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.350358
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.828556
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.877534
object-new (click) 2406 2818 2 36 0 0% 0 0 1.067266
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.301815
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.00799
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.168012
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.775945
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.805176
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.746249
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.493451
setivar (click) 2783 3726 3 46 0 0% 0 0 1.254503
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.416127
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.752646
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.45927
structaref (click) 4407 9095 3 88 0 0% 0 0 2.352073
structaset (click) 4113 5834 3 70 0 0% 0 0 1.805577
throw (click) 5953 4624 5 53 0 0% 0 0 1.762924

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.