Ruby Benchmarks

Details for Benchmarks at 2026-05-26 01:18:06 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.4% faster than CRuby 4.1.0dev
  • 11.5% faster than YJIT 3.4.7
On railsbench it is
  • 127.1% faster than CRuby 4.1.0dev
  • 17.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 51 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 91 5 93 50 196 50 242
chunky-png 5 32 5 31 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 421 5 444 50 619 50 681
liquid-compile 5 417 5 517 50 552 50 853
liquid-render 5 173 5 175 50 432 50 467
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 210 50 253 50 314
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 246 50 248
ruby-lsp 5 162 5 165 50 227 50 233
sequel 5 421 5 459 50 586 50 657
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 173 50 183 50 213
addressable-join 5 74 5 85 50 65 50 85
addressable-merge 5 160 5 160 50 221 50 249
addressable-new 5 355 5 348 50 520 50 546
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 107 50 103 50 123
addressable-setters 5 184 5 187 50 232 50 262
addressable-to-s 5 163 5 172 50 183 50 212
binarytrees 5 82 5 83 50 136 50 149
blurhash 5 84 5 83 50 145 50 145
erubi 5 130 5 146 50 121 50 150
etanni 5 101 5 78 50 73 50 45
fannkuchredux 5 52 5 56 50 99 50 106
fluentd 5 58 5 61 50 31 50 28
gcbench 5 10 5 10 50 10 50 18
graphql 5 374 5 463 50 564 50 958
graphql-native 5 57 5 90 50 21 50 72
knucleotide 5 163 5 141 50 118 50 95
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 50 50 88 50 97
nbody 5 250 5 238 50 662 50 654
nqueens 5 119 5 120 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 184 50 697 50 808
protoboeuf-encode 5 197 5 202 50 807 50 793
rack 5 445 5 471 50 716 50 818
ruby-json 5 84 5 115 50 50 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 225 50 250 50 282
sudoku 5 48 5 49 50 155 50 169
tinygql 5 42 5 43 50 36 50 56
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 38 5 39 50 454 50 455
attr_accessor 5 157 5 173 50 1832 50 1870
cfunc_itself 5 346 5 312 50 1254 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 216 5 313 50 2315 50 2423
getivar-module 5 103 5 137 50 89 50 284
keyword_args 5 102 5 102 50 1239 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 468 50 297 50 1504
object-new-initialize 5 169 5 233 50 260 50 1030
object-new-no-escape 5 81 5 138 50 89 50 513
respond_to 5 139 5 120 50 3906 50 3900
ruby-xor 5 247 5 235 50 1306 50 1292
send_bmethod 5 118 5 115 50 5539 50 4525
send_cfunc_block 5 105 5 99 50 306 50 266
send_rubyfunc_block 5 195 5 195 50 1371 50 1375
setivar 5 359 5 366 50 4930 50 4942
setivar_object 5 341 5 291 50 759 50 648
setivar_young 5 341 5 292 50 809 50 680
str_concat 5 391 5 460 50 1202 50 1138
structaref 5 153 5 176 50 1799 50 1855
structaset 5 197 5 222 50 370 50 488
throw 5 1109 5 1343 50 1442 50 1830

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) 1564058 1408289 203 2675 0 0% 0 0 78.01699
chunky-png (click) 325370 266756 79 1376 1 0% 0 0 38.20724
erubi-rails (click) 1393750 1166721 269 3627 23 0% 0 0 94.575353
hexapdf (click) 1539088 1302376 594 15827 44 0% 0 0 431.663096
liquid-c (click) 562503 505430 114 2240 5 0% 0 0 58.144364
liquid-compile (click) 483163 463495 146 2740 2 0% 0 0 77.425004
liquid-render (click) 668959 669842 131 2963 8 0% 0 0 77.466
lobsters (click) 8597026 7285659 3124 63826 122 0% 0 0 2033.782956
mail (click) 876862 859778 345 7738 40 0% 0 0 207.794093
psych-load (click) 293121 261283 61 833 2 0% 0 0 23.105453
railsbench (click) 3361542 2854338 1592 19781 105 0% 0 0 535.221646
rubocop (click) 5804164 5071185 3002 57343 127 0% 6 0 1627.46554
ruby-lsp (click) 1053833 925416 409 7472 47 0% 1 0 197.75163
sequel (click) 510900 429770 11 119 0 0% 0 0 3.916399
shipit (click) 7090508 5889913 3124 50296 147 0% 0 0 1606.030744
addressable-equality (click) 325216 300892 44 1380 1 0% 0 0 33.156207
addressable-getters (click) 283516 266159 26 863 0 0% 0 0 20.360784
addressable-join (click) 295791 241909 24 1005 0 0% 0 0 24.687287
addressable-merge (click) 291237 287926 27 896 0 0% 0 0 21.373336
addressable-new (click) 266593 253211 21 569 0 0% 0 0 13.76963
addressable-normalize (click) 319118 252939 43 1362 1 0% 0 0 32.257737
addressable-parse (click) 288549 278750 26 880 0 0% 0 0 21.021539
addressable-setters (click) 266263 254947 20 582 0 0% 0 0 14.140713
addressable-to-s (click) 281348 254605 26 849 0 0% 0 0 19.805116
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.755771
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.730887
erubi (click) 251944 241589 6 134 0 0% 0 0 3.815224
etanni (click) 32752 34339 8 114 0 0% 0 0 3.407485
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.767157
fluentd (click) 493053 448909 7 116 0 0% 0 0 3.598719
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.311133
graphql (click) 417441 372769 73 1931 19 0% 0 0 52.581935
graphql-native (click) 361075 313982 39 532 0 0% 0 0 13.671428
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.701338
lee (click) 321476 289313 49 1093 0 0% 0 0 29.878587
matmul (click) 11103 4709 8 136 0 0% 0 0 4.105972
nbody (click) 14448 21176 6 251 0 0% 0 0 6.089349
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.191023
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.733076
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.205397
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.67635
rack (click) 288310 247331 35 586 0 0% 0 0 14.607529
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.633724
rubyboy (click) 708514 625449 154 6873 42 0% 0 0 163.319438
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.554391
splay (click) 34953 22682 9 175 0 0% 0 0 5.191459
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.740581
tinygql (click) 300559 228999 59 1026 5 0% 0 0 26.039878
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1860.371508
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 471.213728
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.108214
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.479011
fib (click) 2659 2995 3 30 0 0% 0 0 1.08639
getivar (click) 3789 6778 3 79 0 0% 0 0 1.930921
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.311457
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.777925
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.891608
object-new (click) 2406 2818 2 36 0 0% 0 0 1.006924
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.297551
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.84822
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.110914
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799074
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.78901
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.260542
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.75917
setivar (click) 2783 3726 3 46 0 0% 0 0 1.241572
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406017
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.696403
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.396594
structaref (click) 4407 9095 3 88 0 0% 0 0 2.345514
structaset (click) 4113 5834 3 70 0 0% 0 0 1.789416
throw (click) 5953 4624 5 53 0 0% 0 0 1.763706

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.