Ruby Benchmarks

Details for Benchmarks at 2026-06-25 01:20:23 UTC

YJIT metrics from the ruby-bench suite using Ruby 30e15d84d3.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.5% faster than CRuby 4.1.0dev
  • 10.6% faster than YJIT 3.4.7
On railsbench it is
  • 119.9% faster than CRuby 4.1.0dev
  • 17.7% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 4 minutes
aarch64 runtime: 7 hours, 53 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 95 50 198 50 241
chunky-png 5 32 5 30 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 441 50 624 50 681
liquid-compile 5 416 5 512 50 583 50 838
liquid-render 5 170 5 172 50 433 50 470
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 254 50 304
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 249 50 251
ruby-lsp 5 154 5 161 50 222 50 229
sequel 5 426 5 471 50 584 50 668
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 18
addressable-getters 5 164 5 170 50 184 50 207
addressable-join 5 75 5 82 50 65 50 84
addressable-merge 5 160 5 158 50 221 50 243
addressable-new 5 355 5 345 50 517 50 535
addressable-normalize 5 53 5 58 50 59 50 71
addressable-parse 5 104 5 106 50 104 50 118
addressable-setters 5 186 5 185 50 233 50 256
addressable-to-s 5 164 5 170 50 182 50 206
binarytrees 5 82 5 87 50 136 50 145
blurhash 5 83 5 84 50 145 50 144
erubi 5 129 5 148 50 136 50 155
etanni 5 99 5 80 50 72 50 47
fannkuchredux 5 55 5 56 50 100 50 103
fluentd 5 62 5 60 50 21 50 25
gcbench 5 10 5 10 50 10 50 16
graphql 5 371 5 469 50 573 50 977
graphql-native 5 58 5 87 50 22 50 64
knucleotide 5 163 5 144 50 118 50 98
lee 5 23 5 29 50 10 50 17
matmul 5 53 5 54 50 88 50 95
nbody 5 250 5 243 50 663 50 644
nqueens 5 119 5 128 50 554 50 574
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 698 50 779
protoboeuf-encode 5 201 5 194 50 802 50 775
rack 5 443 5 469 50 716 50 805
ruby-json 5 84 5 113 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 207 50 250 50 245
sudoku 5 48 5 50 50 155 50 158
tinygql 5 41 5 44 50 35 50 56
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 458 50 453
attr_accessor 5 155 5 174 50 1833 50 1873
cfunc_itself 5 348 5 311 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 215 5 336 50 2306 50 2434
getivar-module 5 103 5 137 50 87 50 283
keyword_args 5 102 5 108 50 1240 50 1245
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 479 50 297 50 1444
object-new-initialize 5 169 5 234 50 260 50 987
object-new-no-escape 5 81 5 137 50 89 50 502
respond_to 5 139 5 124 50 3906 50 3902
ruby-xor 5 247 5 237 50 1305 50 1310
send_bmethod 5 118 5 110 50 5539 50 4526
send_cfunc_block 5 107 5 104 50 305 50 312
send_rubyfunc_block 5 195 5 195 50 1371 50 1375
setivar 5 359 5 382 50 4929 50 4960
setivar_object 5 341 5 308 50 762 50 653
setivar_young 5 341 5 308 50 808 50 681
str_concat 5 391 5 427 50 1203 50 1049
structaref 5 153 5 180 50 1798 50 1858
structaset 5 198 5 220 50 368 50 487
throw 5 1109 5 1379 50 1443 50 1790

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) 1562275 1375090 203 2664 0 0% 0 0 74.093335
chunky-png (click) 323352 280864 79 1376 1 0% 0 0 38.144494
erubi-rails (click) 1389057 1218104 268 3626 23 0% 0 0 95.289976
hexapdf (click) 1534695 1281043 593 15767 44 0% 0 0 432.272742
liquid-c (click) 564781 533383 114 2240 5 0% 0 0 58.545112
liquid-compile (click) 482405 422924 146 2669 2 0% 0 0 73.214079
liquid-render (click) 671776 584071 131 2963 8 0% 0 0 77.34714
lobsters (click) 8561980 7152323 3124 63410 122 0% 0 0 2020.149791
mail (click) 873640 840946 345 7739 40 0% 0 0 208.767771
psych-load (click) 289757 290144 61 829 2 0% 0 0 23.455848
railsbench (click) 3360576 2937150 1592 19741 105 0% 0 0 534.273706
rubocop (click) 5809372 5110177 3002 57381 127 0% 6 0 1727.417092
ruby-lsp (click) 1053382 958398 409 7470 47 0% 1 0 200.837573
sequel (click) 511413 463454 11 119 0 0% 0 0 4.31164
shipit (click) 6866803 5865662 3136 50039 147 0% 0 0 1580.514609
addressable-equality (click) 306484 294765 44 1381 1 0% 0 0 33.074742
addressable-getters (click) 285447 260151 26 863 0 0% 0 0 20.239985
addressable-join (click) 291218 252600 24 941 0 0% 0 0 23.420081
addressable-merge (click) 273225 249503 27 896 0 0% 0 0 21.039741
addressable-new (click) 264043 242178 21 563 0 0% 0 0 13.587549
addressable-normalize (click) 318764 269218 43 1327 1 0% 0 0 31.673972
addressable-parse (click) 286401 268165 26 880 0 0% 0 0 21.091086
addressable-setters (click) 266275 230371 20 582 0 0% 0 0 14.125403
addressable-to-s (click) 285334 234777 26 849 0 0% 0 0 20.151175
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.758365
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.828022
erubi (click) 252242 241817 6 134 0 0% 0 0 3.882628
etanni (click) 32989 26478 8 114 0 0% 0 0 3.420918
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.860053
fluentd (click) 518989 446091 7 116 0 0% 0 0 3.631252
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.36818
graphql (click) 418351 373967 74 1940 19 0% 0 0 52.620499
graphql-native (click) 361336 322942 39 532 0 0% 0 0 13.712247
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.719241
lee (click) 322390 306895 50 1102 0 0% 0 0 30.447752
matmul (click) 11103 4709 8 136 0 0% 0 0 4.100063
nbody (click) 14448 21176 6 251 0 0% 0 0 6.133871
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.241428
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.191233
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.808288
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 43.002473
rack (click) 288278 256047 35 581 0 0% 0 0 14.556853
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.77602
rubyboy (click) 708298 633464 154 6871 42 0% 0 0 162.834465
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.728939
splay (click) 34617 22483 9 175 0 0% 0 0 5.279506
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.881208
tinygql (click) 304571 282993 59 1026 5 0% 0 0 26.409089
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1859.242302
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.668671
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.091776
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.49322
fib (click) 2659 2995 3 30 0 0% 0 0 1.129195
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936554
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.305489
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.778494
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.91651
object-new (click) 2406 2818 2 36 0 0% 0 0 1.003098
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.303792
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.745316
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.151941
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.783344
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.79352
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.319287
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.739531
setivar (click) 2783 3726 3 46 0 0% 0 0 1.260724
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.421239
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.690075
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.478383
structaref (click) 4407 9095 3 88 0 0% 0 0 2.363307
structaset (click) 4113 5834 3 70 0 0% 0 0 1.813299
throw (click) 5953 4624 5 53 0 0% 0 0 1.758241

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.