Ruby Benchmarks

Details for Benchmarks at 2026-06-27 01:18:25 UTC

YJIT metrics from the ruby-bench suite using Ruby 33ebed7094.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.2% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
On railsbench it is
  • 117.8% faster than CRuby 4.1.0dev
  • 15.9% 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 92 50 202 50 228
chunky-png 5 32 5 30 50 33 50 25
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 442 50 624 50 677
liquid-compile 5 418 5 514 50 549 50 849
liquid-render 5 172 5 175 50 429 50 464
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 209 50 253 50 302
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 248 50 252
ruby-lsp 5 153 5 159 50 240 50 233
sequel 5 421 5 460 50 583 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 30 50 12 50 18
addressable-getters 5 164 5 170 50 183 50 208
addressable-join 5 74 5 83 50 63 50 83
addressable-merge 5 161 5 158 50 222 50 241
addressable-new 5 355 5 345 50 518 50 535
addressable-normalize 5 53 5 59 50 60 50 70
addressable-parse 5 104 5 105 50 103 50 117
addressable-setters 5 184 5 184 50 233 50 253
addressable-to-s 5 164 5 170 50 181 50 206
binarytrees 5 82 5 87 50 136 50 143
blurhash 5 84 5 84 50 145 50 144
erubi 5 134 5 151 50 122 50 153
etanni 5 100 5 81 50 73 50 48
fannkuchredux 5 55 5 57 50 101 50 102
fluentd 5 59 5 59 50 21 50 31
gcbench 5 10 5 10 50 10 50 16
graphql 5 363 5 470 50 561 50 971
graphql-native 5 58 5 90 50 23 50 69
knucleotide 5 164 5 145 50 117 50 98
lee 5 22 5 29 50 10 50 16
matmul 5 53 5 54 50 88 50 95
nbody 5 250 5 245 50 663 50 675
nqueens 5 119 5 129 50 554 50 574
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 697 50 788
protoboeuf-encode 5 200 5 191 50 803 50 793
rack 5 441 5 472 50 722 50 800
ruby-json 5 83 5 114 50 50 50 90
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 203 50 250 50 237
sudoku 5 48 5 50 50 155 50 157
tinygql 5 41 5 44 50 39 50 54
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 457 50 456
attr_accessor 5 157 5 180 50 1832 50 1886
cfunc_itself 5 348 5 309 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 216 5 339 50 2315 50 2442
getivar-module 5 103 5 138 50 88 50 284
keyword_args 5 102 5 103 50 1240 50 1245
loops-times 5 23 5 26 50 63 50 59
object-new 5 268 5 474 50 296 50 1448
object-new-initialize 5 169 5 234 50 259 50 988
object-new-no-escape 5 80 5 138 50 89 50 502
respond_to 5 139 5 126 50 3897 50 3905
ruby-xor 5 247 5 235 50 1305 50 1313
send_bmethod 5 118 5 108 50 5539 50 4527
send_cfunc_block 5 106 5 106 50 303 50 313
send_rubyfunc_block 5 196 5 197 50 1372 50 1375
setivar 5 359 5 379 50 4931 50 4957
setivar_object 5 341 5 295 50 763 50 595
setivar_young 5 341 5 294 50 810 50 603
str_concat 5 391 5 430 50 1201 50 1035
structaref 5 152 5 186 50 1798 50 1870
structaset 5 198 5 216 50 370 50 487
throw 5 1110 5 1379 50 1440 50 1782

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) 1560659 1422116 203 2666 0 0% 0 0 74.734453
chunky-png (click) 325946 292438 79 1376 1 0% 0 0 38.163483
erubi-rails (click) 1388030 1152052 268 3626 23 0% 0 0 94.672416
hexapdf (click) 1534120 1345748 593 15768 44 0% 0 0 433.66974
liquid-c (click) 567316 512121 114 2240 5 0% 0 0 58.941978
liquid-compile (click) 482265 439299 146 2669 2 0% 0 0 73.68852
liquid-render (click) 673678 635515 131 2963 8 0% 0 0 78.089287
lobsters (click) 8561838 7193347 3122 63413 122 0% 0 0 2020.954877
mail (click) 876184 836082 345 7739 40 0% 0 0 208.943135
psych-load (click) 293257 245644 61 829 2 0% 0 0 23.756216
railsbench (click) 3360764 2864300 1592 19740 105 0% 0 0 536.419199
rubocop (click) 5804654 5007817 3003 57357 128 0% 6 0 1628.416563
ruby-lsp (click) 1050699 922676 409 7470 47 0% 1 0 199.385705
sequel (click) 511175 405942 11 119 0 0% 0 0 4.268785
shipit (click) 6880971 5800109 3133 49920 147 0% 0 0 1579.000826
addressable-equality (click) 324811 284341 44 1381 1 0% 0 0 33.500024
addressable-getters (click) 285368 252018 26 863 0 0% 0 0 20.567984
addressable-join (click) 290860 285179 24 941 0 0% 0 0 23.019887
addressable-merge (click) 290560 262499 27 896 0 0% 0 0 21.432904
addressable-new (click) 265391 227239 21 563 0 0% 0 0 13.628663
addressable-normalize (click) 318197 276706 43 1327 1 0% 0 0 31.400575
addressable-parse (click) 285546 217998 26 880 0 0% 0 0 20.896222
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 14.179724
addressable-to-s (click) 284645 250310 26 849 0 0% 0 0 20.11913
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.760693
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.827387
erubi (click) 251877 233456 6 134 0 0% 0 0 3.865216
etanni (click) 32989 26478 8 114 0 0% 0 0 3.413941
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.765899
fluentd (click) 518936 455209 7 116 0 0% 0 0 3.586905
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.32053
graphql (click) 417947 332789 74 1940 19 0% 0 0 53.232427
graphql-native (click) 362125 299651 39 532 0 0% 0 0 13.609375
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.646767
lee (click) 322025 298554 50 1102 0 0% 0 0 30.54468
matmul (click) 11103 4709 8 136 0 0% 0 0 4.164394
nbody (click) 14448 21176 6 251 0 0% 0 0 6.147778
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.219912
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.097802
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.089792
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 43.014319
rack (click) 288192 272458 35 581 0 0% 0 0 14.572877
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.812102
rubyboy (click) 708158 584263 154 6871 42 0% 0 0 163.105998
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.663687
splay (click) 34617 22483 9 175 0 0% 0 0 5.314702
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.938443
tinygql (click) 303875 265758 59 1026 5 0% 0 0 26.386819
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1870.506163
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 477.662045
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.037018
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.507765
fib (click) 2659 2995 3 30 0 0% 0 0 1.07474
getivar (click) 3789 6778 3 79 0 0% 0 0 1.937734
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.293293
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807458
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.869497
object-new (click) 2406 2818 2 36 0 0% 0 0 0.969847
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.276284
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.750212
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.15203
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.7784
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.786659
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.287469
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.73881
setivar (click) 2783 3726 3 46 0 0% 0 0 1.245218
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408266
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.682181
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.486637
structaref (click) 4407 9095 3 88 0 0% 0 0 2.321058
structaset (click) 4113 5834 3 70 0 0% 0 0 1.789977
throw (click) 5953 4624 5 53 0 0% 0 0 1.749174

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.