Ruby Benchmarks

Details for Benchmarks at 2026-02-02 00:53:17 UTC

YJIT metrics from the ruby-bench suite using Ruby 198b52f5ad.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.2% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 114.4% faster than CRuby 4.1.0dev
  • 12.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 2 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 90 5 100 50 198 50 239
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 429 50 624 50 639
liquid-compile 5 405 5 481 50 584 50 735
liquid-render 5 170 5 176 50 433 50 441
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 194 50 253 50 269
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 159 50 248 50 255
ruby-lsp 5 159 5 164 50 230 50 236
sequel 5 420 5 430 50 581 50 603
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 12 50 12
addressable-getters 5 163 5 168 50 183 50 198
addressable-join 5 73 5 77 50 66 50 72
addressable-merge 5 159 5 158 50 221 50 225
addressable-new 5 354 5 359 50 520 50 548
addressable-normalize 5 53 5 55 50 59 50 61
addressable-parse 5 101 5 105 50 104 50 111
addressable-setters 5 182 5 185 50 227 50 235
addressable-to-s 5 163 5 172 50 183 50 198
binarytrees 5 82 5 86 50 136 50 146
blurhash 5 83 5 88 50 143 50 145
erubi 5 135 5 147 50 120 50 151
etanni 5 97 5 73 50 71 50 38
fannkuchredux 5 55 5 57 50 102 50 106
fluentd 5 56 5 65 50 20 50 28
graphql 5 371 5 459 50 573 50 935
graphql-native 5 59 5 86 50 22 50 66
knucleotide 5 163 5 158 50 118 50 112
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 56 50 94 50 98
nbody 5 246 5 305 50 676 50 659
nqueens 5 116 5 126 50 557 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 706 50 785
protoboeuf-encode 5 196 5 205 50 835 50 829
rack 5 439 5 456 50 716 50 724
ruby-json 5 84 5 101 50 50 50 73
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 168
tinygql 5 41 5 43 50 36 50 49
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 40 50 452 50 458
attr_accessor 5 157 5 200 50 1835 50 1919
cfunc_itself 5 349 5 349 50 1255 50 1259
fib 5 124 5 145 50 939 50 939
getivar 5 216 5 291 50 2312 50 2403
getivar-module 5 104 5 125 50 90 50 261
keyword_args 5 100 5 96 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 384 50 297 50 768
respond_to 5 139 5 139 50 3886 50 3899
ruby-xor 5 236 5 239 50 1313 50 1283
send_bmethod 5 116 5 121 50 5539 50 4527
send_cfunc_block 5 105 5 106 50 353 50 353
send_rubyfunc_block 5 250 5 253 50 6925 50 6925
setivar 5 359 5 479 50 4927 50 5043
setivar_object 5 341 5 303 50 752 50 642
setivar_young 5 341 5 306 50 799 50 661
str_concat 5 391 5 450 50 1200 50 1171
structaref 5 157 5 193 50 1813 50 1887
structaset 5 202 5 251 50 395 50 488
throw 5 1089 5 1339 50 1420 50 1655

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) 1544046 1288800 203 2634 0 0% 0 0 75.119238
chunky-png (click) 321024 304500 79 1374 1 0% 0 0 39.051408
erubi-rails (click) 1366416 1190713 268 3712 22 0% 0 0 99.513597
hexapdf (click) 1521448 1287747 594 15675 44 0% 0 0 436.837736
liquid-c (click) 558061 522337 114 2231 5 0% 0 0 60.415726
liquid-compile (click) 478181 429871 146 2725 2 0% 0 0 79.603409
liquid-render (click) 666476 574704 131 2950 8 0% 0 0 79.35986
lobsters (click) 8679858 7425648 3123 63944 117 0% 0 0 2108.307815
mail (click) 866214 849678 345 7700 40 0% 0 0 213.055604
psych-load (click) 287471 248701 61 829 2 0% 0 0 24.121105
railsbench (click) 3338153 2880195 1591 19684 97 0% 0 0 552.423257
rubocop (click) 5755403 4901299 3002 56850 126 0% 6 0 1668.269095
ruby-lsp (click) 1038165 800436 407 7369 46 0% 1 0 203.595326
sequel (click) 502423 398173 11 119 0 0% 0 0 3.916379
shipit (click) 7451469 6289350 3440 55527 174 0% 1 0 1859.931584
addressable-equality (click) 316354 292850 44 1379 1 0% 0 0 34.307272
addressable-getters (click) 274579 265330 26 865 0 0% 0 0 21.209573
addressable-join (click) 287360 242228 24 1005 0 0% 0 0 25.331584
addressable-merge (click) 282806 247285 27 896 0 0% 0 0 22.170378
addressable-new (click) 258364 229318 21 579 0 0% 0 0 14.422967
addressable-normalize (click) 313090 281004 43 1340 1 0% 0 0 33.325918
addressable-parse (click) 280118 238109 26 880 0 0% 0 0 21.828685
addressable-setters (click) 257832 214306 20 582 0 0% 0 0 14.575366
addressable-to-s (click) 276911 243241 26 849 0 0% 0 0 20.69925
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.832256
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.115673
erubi (click) 247678 230981 6 132 0 0% 0 0 3.890644
etanni (click) 32837 27420 8 111 0 0% 0 0 3.465242
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.019123
fluentd (click) 484321 417173 7 115 0 0% 0 0 3.774837
graphql (click) 408083 358680 73 1895 19 1% 0 0 53.196174
graphql-native (click) 353042 325590 39 532 0 0% 0 0 14.222298
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.908851
lee (click) 317528 311567 49 1091 0 0% 0 0 31.529479
matmul (click) 11103 4709 8 136 0 0% 0 0 4.235632
nbody (click) 14448 21176 6 251 0 0% 0 0 6.136058
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.40624
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.587075
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.133033
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.078471
rack (click) 282632 260019 35 627 0 0% 0 0 16.682208
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.702111
rubyboy (click) 701266 626819 154 6871 42 0% 0 0 169.052987
rubykon (click) 147478 130977 137 2088 3 0% 0 0 56.453667
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.253851
tinygql (click) 287537 273164 59 1031 5 0% 0 0 27.553275
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1944.015761
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.736604
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.069027
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.507376
fib (click) 2659 2995 3 30 0 0% 0 0 1.105499
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936754
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.371604
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823343
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.879365
object-new (click) 2406 2818 2 36 0 0% 0 0 1.053474
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.187681
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.813092
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.845722
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.123291
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.511484
setivar (click) 2783 3726 3 46 0 0% 0 0 1.309252
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.439825
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.733319
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.46426
structaref (click) 4407 9095 3 88 0 0% 0 0 2.331739
structaset (click) 4113 5834 3 70 0 0% 0 0 1.94106
throw (click) 5953 4624 5 53 0 0% 0 0 1.809019

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.