Ruby Benchmarks

Details for Benchmarks at 2026-03-29 01:01:02 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.2% faster than CRuby 4.1.0dev
  • 4.1% faster than YJIT 3.4.7
On railsbench it is
  • 107.4% faster than CRuby 4.1.0dev
  • 10.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 59 minutes
aarch64 runtime: 7 hours, 46 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 93 5 97 50 204 50 247
chunky-png 5 32 5 30 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 437 50 621 50 643
liquid-compile 5 421 5 476 50 578 50 679
liquid-render 5 170 5 173 50 431 50 350
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 200 50 254 50 279
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 248 50 255
ruby-lsp 5 152 5 164 50 214 50 228
sequel 5 423 5 439 50 589 50 605
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 12
addressable-getters 5 165 5 170 50 183 50 209
addressable-join 5 74 5 80 50 66 50 74
addressable-merge 5 160 5 155 50 223 50 229
addressable-new 5 350 5 345 50 512 50 545
addressable-normalize 5 53 5 57 50 60 50 64
addressable-parse 5 104 5 106 50 105 50 114
addressable-setters 5 184 5 181 50 235 50 240
addressable-to-s 5 164 5 171 50 182 50 208
binarytrees 5 82 5 84 50 136 50 158
blurhash 5 83 5 83 50 144 50 145
erubi 5 141 5 156 50 126 50 153
etanni 5 100 5 75 50 73 50 41
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 61 5 64 50 20 50 23
gcbench 5 10 5 10 50 10 50 16
graphql 5 374 5 450 50 567 50 966
graphql-native 5 59 5 88 50 22 50 71
knucleotide 5 163 5 162 50 117 50 116
lee 5 23 5 30 50 10 50 13
matmul 5 53 5 54 50 88 50 96
nbody 5 250 5 270 50 663 50 661
nqueens 5 119 5 121 50 554 50 576
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 181 50 697 50 807
protoboeuf-encode 5 197 5 198 50 798 50 818
rack 5 433 5 449 50 712 50 617
ruby-json 5 83 5 102 50 50 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 230 50 250 50 282
sudoku 5 48 5 49 50 155 50 158
tinygql 5 41 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 458 50 459
attr_accessor 5 157 5 187 50 1833 50 1905
cfunc_itself 5 349 5 303 50 1255 50 1259
fib 5 125 5 133 50 939 50 939
getivar 5 210 5 276 50 2312 50 2391
getivar-module 5 103 5 116 50 89 50 255
keyword_args 5 102 5 101 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 61
object-new 5 268 5 417 50 298 50 1131
object-new-initialize 5 169 5 245 50 259 50 854
object-new-no-escape 5 81 5 130 50 89 50 410
respond_to 5 139 5 129 50 3901 50 3899
ruby-xor 5 247 5 226 50 1305 50 1300
send_bmethod 5 118 5 115 50 5539 50 4527
send_cfunc_block 5 106 5 106 50 354 50 382
send_rubyfunc_block 5 243 5 262 50 6918 50 6910
setivar 5 359 5 474 50 4929 50 5039
setivar_object 5 341 5 299 50 764 50 548
setivar_young 5 342 5 302 50 810 50 563
str_concat 5 390 5 437 50 1199 50 1184
structaref 5 153 5 180 50 1798 50 1862
structaset 5 198 5 210 50 370 50 478
throw 5 1110 5 1281 50 1440 50 1749

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) 1558767 1396143 203 2665 0 0% 0 0 73.866871
chunky-png (click) 324890 274257 79 1376 1 0% 0 0 38.565954
erubi-rails (click) 1368975 1187665 268 3574 22 0% 0 0 92.282276
hexapdf (click) 1505794 1333670 593 15433 44 0% 0 0 418.193145
liquid-c (click) 561674 498430 114 2227 5 0% 0 0 57.765371
liquid-compile (click) 473356 405616 146 2578 2 0% 0 0 72.131937
liquid-render (click) 640729 513364 132 2622 6 0% 0 0 69.031615
lobsters (click) 8326867 6998101 3114 60612 119 0% 0 0 1973.085922
mail (click) 873328 807000 345 7728 40 0% 0 0 208.607584
psych-load (click) 290590 248525 61 808 2 0% 0 0 22.877421
railsbench (click) 3316967 2871804 1592 19231 97 0% 0 0 519.788811
rubocop (click) 5778084 4917425 3003 57023 125 0% 6 0 1611.090578
ruby-lsp (click) 1042615 927675 409 7462 47 0% 1 0 201.011673
sequel (click) 498252 457066 11 94 0 0% 0 0 3.014503
shipit (click) 7324413 6228190 3156 50487 147 0% 0 0 1640.117435
addressable-equality (click) 316401 267221 44 1323 1 0% 0 0 31.530259
addressable-getters (click) 279524 229050 26 863 0 0% 0 0 20.361293
addressable-join (click) 282600 232529 24 861 0 0% 0 0 21.027287
addressable-merge (click) 287122 258967 27 898 0 0% 0 0 22.115492
addressable-new (click) 261587 223405 21 595 0 0% 0 0 14.524667
addressable-normalize (click) 312380 262407 43 1292 1 0% 0 0 31.195598
addressable-parse (click) 281324 213286 26 880 0 0% 0 0 21.199256
addressable-setters (click) 262148 217796 20 584 0 0% 0 0 14.467603
addressable-to-s (click) 279463 260966 26 849 0 0% 0 0 20.075721
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.798566
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.791327
erubi (click) 249456 181335 6 134 0 0% 0 0 3.829179
etanni (click) 32731 34499 8 114 0 0% 0 0 3.445951
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.804527
fluentd (click) 490740 438190 7 116 0 0% 0 0 3.63888
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.367725
graphql (click) 414012 344667 73 1909 20 1% 0 0 52.241263
graphql-native (click) 358098 327162 39 532 0 0% 0 0 13.61686
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.713258
lee (click) 320662 295877 49 1085 0 0% 0 0 30.350101
matmul (click) 11103 4709 8 136 0 0% 0 0 4.171985
nbody (click) 14448 21176 6 251 0 0% 0 0 6.100615
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.185592
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 106.499044
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.307077
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.028916
rack (click) 283890 223313 35 509 0 0% 0 0 13.103526
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.722199
rubyboy (click) 708655 658667 154 6869 42 0% 0 0 163.541243
rubykon (click) 150957 150670 138 2135 4 0% 0 0 56.234903
splay (click) 23803 16994 9 74 0 0% 0 0 2.549075
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.642255
tinygql (click) 303109 272754 59 1037 5 0% 0 0 26.719214
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1871.568569
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.872255
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.09722
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.527435
fib (click) 2659 2995 3 30 0 0% 0 0 1.125418
getivar (click) 3789 6778 3 79 0 0% 0 0 1.92115
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.314635
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.80893
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.878208
object-new (click) 2406 2818 2 36 0 0% 0 0 1.024403
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.352899
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.019531
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.144639
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.778133
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.808148
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.771552
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.462037
setivar (click) 2783 3726 3 46 0 0% 0 0 1.250202
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.410702
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.73925
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.409838
structaref (click) 4407 9095 3 88 0 0% 0 0 2.351675
structaset (click) 4113 5834 3 70 0 0% 0 0 1.786151
throw (click) 5410 4014 5 44 0 0% 0 0 1.551998

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.