Ruby Benchmarks

Details for Benchmarks at 2026-05-25 01:23:09 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.8% faster than CRuby 4.1.0dev
  • 10.5% faster than YJIT 3.4.7
On railsbench it is
  • 121.8% faster than CRuby 4.1.0dev
  • 16.2% 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 90 5 96 50 197 50 241
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 423 5 441 50 621 50 682
liquid-compile 5 420 5 514 50 582 50 862
liquid-render 5 170 5 175 50 431 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 211 50 254 50 310
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 247 50 246
ruby-lsp 5 163 5 161 50 230 50 239
sequel 5 426 5 459 50 592 50 656
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 166 5 173 50 184 50 213
addressable-join 5 75 5 86 50 66 50 86
addressable-merge 5 161 5 161 50 224 50 249
addressable-new 5 354 5 347 50 520 50 547
addressable-normalize 5 53 5 58 50 60 50 71
addressable-parse 5 104 5 107 50 103 50 123
addressable-setters 5 187 5 188 50 234 50 264
addressable-to-s 5 164 5 172 50 183 50 214
binarytrees 5 82 5 83 50 136 50 149
blurhash 5 84 5 83 50 145 50 145
erubi 5 141 5 145 50 138 50 148
etanni 5 100 5 78 50 72 50 45
fannkuchredux 5 55 5 56 50 101 50 106
fluentd 5 62 5 66 50 22 50 28
gcbench 5 10 5 10 50 10 50 18
graphql 5 368 5 465 50 568 50 995
graphql-native 5 57 5 90 50 20 50 71
knucleotide 5 164 5 141 50 118 50 95
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 51 50 88 50 97
nbody 5 250 5 238 50 663 50 654
nqueens 5 119 5 121 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 697 50 808
protoboeuf-encode 5 201 5 202 50 805 50 794
rack 5 441 5 468 50 718 50 807
ruby-json 5 84 5 114 50 51 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 41 5 42 50 40 50 55
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 457 50 458
attr_accessor 5 156 5 173 50 1833 50 1875
cfunc_itself 5 346 5 312 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 216 5 311 50 2316 50 2424
getivar-module 5 103 5 137 50 89 50 284
keyword_args 5 103 5 102 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 436 50 297 50 1502
object-new-initialize 5 169 5 232 50 260 50 1026
object-new-no-escape 5 81 5 137 50 89 50 514
respond_to 5 139 5 120 50 3897 50 3899
ruby-xor 5 247 5 234 50 1306 50 1292
send_bmethod 5 118 5 116 50 5540 50 4526
send_cfunc_block 5 106 5 99 50 304 50 266
send_rubyfunc_block 5 196 5 195 50 1372 50 1375
setivar 5 359 5 366 50 4931 50 4943
setivar_object 5 341 5 291 50 760 50 647
setivar_young 5 341 5 292 50 810 50 680
str_concat 5 391 5 459 50 1202 50 1139
structaref 5 153 5 172 50 1800 50 1810
structaset 5 197 5 221 50 369 50 488
throw 5 1109 5 1349 50 1448 50 1826

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) 1564519 1311384 203 2657 0 0% 0 0 74.633963
chunky-png (click) 323333 297268 79 1376 1 0% 0 0 38.050223
erubi-rails (click) 1388182 1167885 268 3626 23 0% 0 0 93.725806
hexapdf (click) 1531260 1341934 594 15781 44 0% 0 0 428.136716
liquid-c (click) 564568 467122 114 2240 5 0% 0 0 58.539769
liquid-compile (click) 471020 415778 146 2760 2 0% 0 0 78.239027
liquid-render (click) 671024 639706 131 2963 8 0% 0 0 77.31691
lobsters (click) 8573375 7333424 3125 63531 122 0% 0 0 2014.104558
mail (click) 874823 857522 345 7738 40 0% 0 0 207.794921
psych-load (click) 290651 234090 61 829 2 0% 0 0 23.60375
railsbench (click) 3361840 2911362 1592 19772 105 0% 0 0 534.463259
rubocop (click) 5801649 5027306 3002 57335 127 0% 6 0 1619.13029
ruby-lsp (click) 1053833 933680 409 7472 47 0% 1 0 198.655181
sequel (click) 508863 443878 11 119 0 0% 0 0 4.363458
shipit (click) 7216492 6134263 3119 50180 148 0% 0 0 1599.148064
addressable-equality (click) 325500 317529 44 1380 1 0% 0 0 33.133687
addressable-getters (click) 285832 260491 26 863 0 0% 0 0 20.353807
addressable-join (click) 289254 258602 24 945 0 0% 0 0 22.729086
addressable-merge (click) 291563 280100 27 900 0 0% 0 0 21.551762
addressable-new (click) 266593 253211 21 569 0 0% 0 0 13.816838
addressable-normalize (click) 318870 269310 43 1327 1 0% 0 0 31.848185
addressable-parse (click) 288549 278750 26 880 0 0% 0 0 21.101665
addressable-setters (click) 263942 244226 20 582 0 0% 0 0 14.028186
addressable-to-s (click) 285440 259445 26 849 0 0% 0 0 20.079947
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.733767
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.748435
erubi (click) 252223 233645 6 134 0 0% 0 0 3.800972
etanni (click) 32989 26478 8 114 0 0% 0 0 3.385695
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.826413
fluentd (click) 491389 471523 7 116 0 0% 0 0 3.570836
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.318966
graphql (click) 417654 372919 73 1931 19 0% 0 0 52.181039
graphql-native (click) 361075 313982 39 532 0 0% 0 0 13.703807
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.712467
lee (click) 317658 309292 49 1093 0 0% 0 0 29.872644
matmul (click) 11103 4709 8 136 0 0% 0 0 4.085621
nbody (click) 14448 21176 6 251 0 0% 0 0 6.143446
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.169321
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.786878
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 70.932845
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.658543
rack (click) 290479 251164 35 628 0 0% 0 0 15.647357
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.711952
rubyboy (click) 706654 631475 154 6873 42 0% 0 0 163.658685
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.029376
splay (click) 34953 22682 9 175 0 0% 0 0 5.184351
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.747608
tinygql (click) 304646 274779 59 1026 5 0% 0 0 26.334978
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1850.778029
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 471.877287
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.105738
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.503619
fib (click) 2659 2995 3 30 0 0% 0 0 1.112026
getivar (click) 3789 6778 3 79 0 0% 0 0 1.920958
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.329789
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.779547
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.874136
object-new (click) 2406 2818 2 36 0 0% 0 0 0.994952
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.245542
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.903061
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.131036
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.823277
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.805606
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.28725
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.750172
setivar (click) 2783 3726 3 46 0 0% 0 0 1.253104
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.380559
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.713568
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.41628
structaref (click) 4407 9095 3 88 0 0% 0 0 2.357212
structaset (click) 4113 5834 3 70 0 0% 0 0 1.774165
throw (click) 5953 4624 5 53 0 0% 0 0 1.749113

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.