Ruby Benchmarks

Details for Benchmarks at 2026-04-12 01:03:55 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.2% faster than CRuby 4.1.0dev
  • 8.1% faster than YJIT 3.4.7
On railsbench it is
  • 114.1% faster than CRuby 4.1.0dev
  • 13.3% 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 91 5 95 50 200 50 244
chunky-png 5 32 5 31 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 424 5 440 50 617 50 659
liquid-compile 5 406 5 481 50 580 50 743
liquid-render 5 171 5 171 50 414 50 453
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 201 50 254 50 286
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 154 50 247 50 243
ruby-lsp 5 153 5 161 50 224 50 233
sequel 5 423 5 452 50 601 50 630
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 167 50 184 50 198
addressable-join 5 75 5 80 50 65 50 72
addressable-merge 5 161 5 153 50 222 50 222
addressable-new 5 352 5 342 50 521 50 530
addressable-normalize 5 53 5 55 50 60 50 60
addressable-parse 5 103 5 104 50 102 50 111
addressable-setters 5 185 5 177 50 232 50 234
addressable-to-s 5 164 5 167 50 182 50 197
binarytrees 5 82 5 85 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 135 5 155 50 135 50 157
etanni 5 100 5 80 50 73 50 47
fannkuchredux 5 55 5 56 50 100 50 101
fluentd 5 58 5 62 50 20 50 23
gcbench 5 10 5 10 50 10 50 15
graphql 5 359 5 442 50 569 50 940
graphql-native 5 57 5 88 50 21 50 69
knucleotide 5 163 5 143 50 118 50 97
lee 5 22 5 29 50 10 50 13
matmul 5 53 5 58 50 88 50 97
nbody 5 250 5 283 50 663 50 678
nqueens 5 119 5 120 50 554 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 697 50 787
protoboeuf-encode 5 197 5 194 50 797 50 788
rack 5 441 5 443 50 711 50 706
ruby-json 5 84 5 106 50 50 50 82
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 205 5 224 50 250 50 282
sudoku 5 48 5 49 50 155 50 160
tinygql 5 41 5 41 50 40 50 52
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 456 50 451
attr_accessor 5 157 5 179 50 1833 50 1885
cfunc_itself 5 347 5 321 50 1255 50 1259
fib 5 102 5 131 50 939 50 939
getivar 5 215 5 303 50 2314 50 2416
getivar-module 5 103 5 137 50 89 50 247
keyword_args 5 102 5 104 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 61
object-new 5 268 5 471 50 298 50 1514
object-new-initialize 5 169 5 252 50 259 50 1023
object-new-no-escape 5 80 5 133 50 89 50 507
respond_to 5 139 5 130 50 3898 50 3902
ruby-xor 5 247 5 235 50 1305 50 1310
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 106 5 107 50 305 50 311
send_rubyfunc_block 5 195 5 208 50 1372 50 1376
setivar 5 359 5 468 50 4930 50 5036
setivar_object 5 344 5 339 50 765 50 598
setivar_young 5 342 5 339 50 810 50 616
str_concat 5 390 5 452 50 1202 50 1174
structaref 5 153 5 178 50 1800 50 1854
structaset 5 198 5 227 50 370 50 476
throw 5 1110 5 1399 50 1445 50 1756

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) 1559293 1305064 203 2675 0 0% 0 0 74.050714
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.367259
erubi-rails (click) 1387981 1314283 268 3638 23 0% 0 0 94.663659
hexapdf (click) 1525426 1310449 593 15787 44 0% 0 0 430.883462
liquid-c (click) 567025 453677 114 2255 5 0% 0 0 59.780784
liquid-compile (click) 481490 420317 146 2733 2 0% 0 0 85.305072
liquid-render (click) 662695 564096 131 2963 8 0% 0 0 78.275398
lobsters (click) 8581645 7212873 3126 63735 122 0% 0 0 2048.510296
mail (click) 876352 850850 345 7738 40 0% 0 0 209.63931
psych-load (click) 291707 242975 61 833 2 0% 0 0 23.755608
railsbench (click) 3358754 2824311 1592 19753 104 0% 0 0 535.19662
rubocop (click) 5795056 4918782 3002 57219 127 0% 6 0 1646.994306
ruby-lsp (click) 1036975 912926 409 7472 47 0% 1 0 199.209652
sequel (click) 507818 483618 11 121 0 0% 0 0 4.766928
shipit (click) 6906289 5761212 3135 50233 147 0% 0 0 1606.45971
addressable-equality (click) 321431 272212 44 1380 1 0% 0 0 35.635428
addressable-getters (click) 282294 248492 26 869 0 0% 0 0 22.622621
addressable-join (click) 268542 217629 24 945 0 0% 0 0 27.196033
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 25.235343
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.610702
addressable-normalize (click) 309677 282946 43 1371 1 0% 0 0 35.328006
addressable-parse (click) 285005 258554 26 886 0 0% 0 0 24.01158
addressable-setters (click) 252907 198324 20 588 0 0% 0 0 16.152986
addressable-to-s (click) 276142 223818 26 849 0 0% 0 0 21.248646
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.709604
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.911268
erubi (click) 251950 200403 6 134 0 0% 0 0 3.916642
etanni (click) 32989 26478 8 114 0 0% 0 0 3.420248
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.823784
fluentd (click) 491827 455736 7 116 0 0% 0 0 3.640647
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.595464
graphql (click) 414863 369827 73 1931 19 0% 0 0 52.347308
graphql-native (click) 358270 335438 39 532 0 0% 0 0 13.902829
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.644875
lee (click) 316823 291057 49 1099 0 0% 0 0 30.095649
matmul (click) 11103 4709 8 136 0 0% 0 0 4.095094
nbody (click) 14448 21176 6 251 0 0% 0 0 6.180954
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.228509
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.824394
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.749638
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.353185
rack (click) 287708 271231 35 581 0 0% 0 0 16.0692
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.731743
rubyboy (click) 708873 666674 154 6871 42 0% 0 0 163.41226
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.497344
splay (click) 34953 22682 9 175 0 0% 0 0 5.186317
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.906179
tinygql (click) 304902 274818 59 1032 5 0% 0 0 26.882586
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1877.640372
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.696615
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.088299
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.506603
fib (click) 2659 2995 3 30 0 0% 0 0 1.088179
getivar (click) 3789 6778 3 79 0 0% 0 0 1.945112
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.318961
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.8329
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.914854
object-new (click) 2406 2818 2 36 0 0% 0 0 1.003951
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.246225
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.94127
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.115139
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.809825
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.78046
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.30087
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.762983
setivar (click) 2783 3726 3 46 0 0% 0 0 1.269283
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.389932
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.716518
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.433295
structaref (click) 4407 9095 3 88 0 0% 0 0 2.345355
structaset (click) 4113 5834 3 70 0 0% 0 0 1.749572
throw (click) 5953 4624 5 53 0 0% 0 0 1.781648

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.