Ruby Benchmarks

Details for Benchmarks at 2026-05-14 01:17:07 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.7% faster than CRuby 4.1.0dev
  • 7.7% faster than YJIT 3.4.7
On railsbench it is
  • 117.3% faster than CRuby 4.1.0dev
  • 14.2% 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 97 50 190 50 226
chunky-png 5 32 5 30 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 438 50 618 50 672
liquid-compile 5 421 5 492 50 581 50 751
liquid-render 5 171 5 173 50 431 50 459
lobsters 5 19 5 21 50 10 50 10
mail 5 194 5 197 50 253 50 287
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 246 50 254
ruby-lsp 5 163 5 162 50 241 50 227
sequel 5 421 5 446 50 597 50 639
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 166 50 183 50 197
addressable-join 5 74 5 80 50 65 50 72
addressable-merge 5 161 5 149 50 223 50 221
addressable-new 5 353 5 334 50 521 50 517
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 104 5 103 50 104 50 110
addressable-setters 5 185 5 174 50 235 50 229
addressable-to-s 5 163 5 165 50 182 50 196
binarytrees 5 82 5 81 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 137 5 149 50 123 50 154
etanni 5 100 5 79 50 73 50 46
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 55 5 64 50 21 50 32
gcbench 5 10 5 10 50 10 50 16
graphql 5 360 5 463 50 567 50 948
graphql-native 5 57 5 89 50 21 50 68
knucleotide 5 163 5 141 50 117 50 95
lee 5 23 5 31 50 10 50 18
matmul 5 53 5 55 50 88 50 96
nbody 5 250 5 281 50 663 50 672
nqueens 5 119 5 122 50 553 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 698 50 813
protoboeuf-encode 5 201 5 187 50 801 50 790
rack 5 446 5 443 50 713 50 716
ruby-json 5 84 5 108 50 51 50 86
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 226 50 250 50 278
sudoku 5 48 5 50 50 155 50 157
tinygql 5 42 5 42 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 451 50 456
attr_accessor 5 157 5 180 50 1831 50 1888
cfunc_itself 5 348 5 316 50 1255 50 1259
fib 5 125 5 136 50 939 50 939
getivar 5 215 5 310 50 2314 50 2420
getivar-module 5 103 5 135 50 88 50 223
keyword_args 5 102 5 100 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 58
object-new 5 268 5 468 50 298 50 1496
object-new-initialize 5 169 5 233 50 260 50 1016
object-new-no-escape 5 80 5 138 50 89 50 510
respond_to 5 138 5 123 50 3902 50 3901
ruby-xor 5 247 5 233 50 1305 50 1294
send_bmethod 5 117 5 116 50 5539 50 4526
send_cfunc_block 5 106 5 101 50 306 50 311
send_rubyfunc_block 5 196 5 201 50 1372 50 1376
setivar 5 359 5 368 50 4929 50 4948
setivar_object 5 341 5 294 50 763 50 595
setivar_young 5 341 5 308 50 808 50 607
str_concat 5 389 5 455 50 1200 50 1167
structaref 5 153 5 181 50 1799 50 1865
structaset 5 198 5 234 50 370 50 482
throw 5 1109 5 1438 50 1439 50 1945

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) 1558452 1361353 203 2659 0 0% 0 0 78.388236
chunky-png (click) 322645 263691 79 1376 1 0% 0 0 38.494193
erubi-rails (click) 1387063 1224073 268 3626 23 0% 0 0 99.506164
hexapdf (click) 1536575 1266164 594 15802 44 0% 0 0 430.238058
liquid-c (click) 562952 497766 114 2240 5 0% 0 0 58.917149
liquid-compile (click) 488381 445621 146 2761 2 0% 0 0 84.089972
liquid-render (click) 670241 598240 131 2963 8 0% 0 0 77.523825
lobsters (click) 8594662 7193321 3125 63726 122 0% 0 0 2137.858332
mail (click) 876359 834625 345 7738 40 0% 0 0 209.773513
psych-load (click) 292003 235577 61 829 2 0% 0 0 23.633889
railsbench (click) 3371948 2884105 1592 19841 104 0% 0 0 538.819962
rubocop (click) 5796405 4997452 3003 57296 128 0% 6 0 1655.885082
ruby-lsp (click) 1053626 1015515 409 7472 47 0% 1 0 199.73406
sequel (click) 508091 410436 11 119 0 0% 0 0 4.439681
shipit (click) 7059018 5896034 3178 51721 154 0% 0 0 1698.707702
addressable-equality (click) 320313 271216 44 1406 1 0% 0 0 37.065292
addressable-getters (click) 279316 228972 26 863 0 0% 0 0 21.921614
addressable-join (click) 287091 231863 24 945 0 0% 0 0 24.970741
addressable-merge (click) 287079 234448 27 900 0 0% 0 0 22.698366
addressable-new (click) 259167 220422 21 569 0 0% 0 0 14.362183
addressable-normalize (click) 314386 231870 43 1327 1 0% 0 0 33.591325
addressable-parse (click) 284065 249482 26 880 0 0% 0 0 22.39507
addressable-setters (click) 259742 223423 20 582 0 0% 0 0 16.008618
addressable-to-s (click) 278919 252497 26 849 0 0% 0 0 22.04219
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.77613
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.059716
erubi (click) 249498 230560 6 134 0 0% 0 0 3.857782
etanni (click) 32989 26478 8 114 0 0% 0 0 3.403664
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.858736
fluentd (click) 488954 428059 7 116 0 0% 0 0 3.624048
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.59551
graphql (click) 412830 375877 73 1931 19 0% 0 0 52.378434
graphql-native (click) 356105 324970 39 532 0 0% 0 0 13.943777
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.675433
lee (click) 321072 313348 49 1093 0 0% 0 0 30.023056
matmul (click) 11103 4709 8 136 0 0% 0 0 4.115229
nbody (click) 14448 21176 6 251 0 0% 0 0 6.141252
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.169201
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.551726
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.152855
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.306269
rack (click) 286842 271413 35 628 0 0% 0 0 17.070674
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.828444
rubyboy (click) 706245 639364 154 6873 42 0% 0 0 163.361218
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.421226
splay (click) 34953 22682 9 175 0 0% 0 0 5.17796
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.907533
tinygql (click) 304487 258099 59 1032 5 0% 0 0 26.763479
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1866.780668
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.649775
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.072508
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.48637
fib (click) 2659 2995 3 30 0 0% 0 0 1.065563
getivar (click) 3789 6778 3 79 0 0% 0 0 1.909998
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.312849
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.825461
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.915379
object-new (click) 2406 2818 2 36 0 0% 0 0 0.999306
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.322969
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.995229
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.160189
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.79282
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.781201
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.268139
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.724499
setivar (click) 2783 3726 3 46 0 0% 0 0 1.253121
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.382414
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.714027
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.402329
structaref (click) 4407 9095 3 88 0 0% 0 0 2.370402
structaset (click) 4113 5834 3 70 0 0% 0 0 1.774708
throw (click) 5953 4624 5 53 0 0% 0 0 1.778759

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.