Ruby Benchmarks

Details for Benchmarks at 2026-05-15 01:14:43 UTC

YJIT metrics from the ruby-bench suite using Ruby 2552db04dd.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.8% faster than CRuby 4.1.0dev
  • 11.4% faster than YJIT 3.4.7
On railsbench it is
  • 121.7% faster than CRuby 4.1.0dev
  • 15.6% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 3 minutes
aarch64 runtime: 7 hours, 52 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 94 50 200 50 244
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 422 5 443 50 624 50 682
liquid-compile 5 419 5 525 50 580 50 852
liquid-render 5 170 5 173 50 431 50 473
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 207 50 254 50 308
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 154 5 160 50 213 50 230
sequel 5 429 5 465 50 600 50 662
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 19
addressable-getters 5 165 5 175 50 184 50 214
addressable-join 5 75 5 85 50 66 50 85
addressable-merge 5 161 5 160 50 222 50 251
addressable-new 5 354 5 350 50 520 50 554
addressable-normalize 5 53 5 59 50 61 50 72
addressable-parse 5 104 5 109 50 101 50 124
addressable-setters 5 186 5 188 50 233 50 262
addressable-to-s 5 164 5 176 50 181 50 214
binarytrees 5 82 5 86 50 136 50 148
blurhash 5 84 5 83 50 145 50 145
erubi 5 132 5 153 50 140 50 156
etanni 5 101 5 78 50 73 50 45
fannkuchredux 5 55 5 57 50 101 50 105
fluentd 5 56 5 61 50 21 50 28
gcbench 5 10 5 10 50 10 50 18
graphql 5 373 5 462 50 570 50 1001
graphql-native 5 58 5 84 50 22 50 73
knucleotide 5 162 5 143 50 117 50 96
lee 5 23 5 30 50 10 50 18
matmul 5 53 5 56 50 88 50 84
nbody 5 250 5 281 50 662 50 703
nqueens 5 119 5 125 50 554 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 697 50 800
protoboeuf-encode 5 197 5 196 50 800 50 780
rack 5 442 5 468 50 709 50 820
ruby-json 5 84 5 116 50 50 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 221 50 250 50 281
sudoku 5 48 5 50 50 155 50 158
tinygql 5 42 5 43 50 40 50 56
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 459 50 452
attr_accessor 5 157 5 175 50 1832 50 1880
cfunc_itself 5 347 5 314 50 1255 50 1259
fib 5 125 5 135 50 939 50 939
getivar 5 210 5 327 50 2312 50 2433
getivar-module 5 103 5 144 50 89 50 264
keyword_args 5 102 5 100 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 469 50 297 50 1513
object-new-initialize 5 168 5 232 50 259 50 1026
object-new-no-escape 5 81 5 138 50 89 50 518
respond_to 5 139 5 124 50 3902 50 3901
ruby-xor 5 247 5 230 50 1305 50 1294
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 107 5 104 50 304 50 277
send_rubyfunc_block 5 196 5 203 50 1372 50 1376
setivar 5 359 5 368 50 4929 50 4946
setivar_object 5 341 5 292 50 762 50 594
setivar_young 5 341 5 293 50 810 50 607
str_concat 5 390 5 455 50 1200 50 1157
structaref 5 153 5 179 50 1799 50 1858
structaset 5 197 5 171 50 370 50 464
throw 5 1108 5 1411 50 1447 50 1847

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) 1564222 1269193 203 2667 0 0% 0 0 73.839375
chunky-png (click) 325370 274968 79 1376 1 0% 0 0 38.220258
erubi-rails (click) 1387467 1191369 268 3626 23 0% 0 0 94.463022
hexapdf (click) 1526006 1342620 593 15792 44 0% 0 0 429.850004
liquid-c (click) 566605 452994 114 2240 5 0% 0 0 59.118774
liquid-compile (click) 488659 421034 146 2757 2 0% 0 0 78.998147
liquid-render (click) 672964 584600 131 2963 8 0% 0 0 78.658015
lobsters (click) 8580311 7249219 3124 63629 122 0% 0 0 2047.674163
mail (click) 876862 892514 345 7738 40 0% 0 0 210.057365
psych-load (click) 292686 244558 61 829 2 0% 0 0 23.477326
railsbench (click) 3362800 2987286 1592 19759 105 0% 0 0 538.714552
rubocop (click) 5794226 5033246 3002 57335 128 0% 6 0 1650.785969
ruby-lsp (click) 1053512 925098 409 7472 47 0% 1 0 200.905704
sequel (click) 510941 446151 11 119 0 0% 0 0 3.901573
shipit (click) 7298135 6313801 3117 50247 148 0% 0 0 1611.130886
addressable-equality (click) 315540 271765 44 1380 1 0% 0 0 33.071041
addressable-getters (click) 285655 284877 26 863 0 0% 0 0 20.13314
addressable-join (click) 291211 252580 24 941 0 0% 0 0 22.97985
addressable-merge (click) 281603 267104 27 900 0 0% 0 0 21.19522
addressable-new (click) 266598 245019 21 569 0 0% 0 0 13.833878
addressable-normalize (click) 320912 279798 43 1327 1 0% 0 0 31.908108
addressable-parse (click) 286818 260054 26 880 0 0% 0 0 20.831357
addressable-setters (click) 266268 246755 20 582 0 0% 0 0 14.142558
addressable-to-s (click) 285445 226677 26 849 0 0% 0 0 20.094014
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.886968
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.28632
erubi (click) 252223 217281 6 134 0 0% 0 0 3.81115
etanni (click) 32989 26478 8 114 0 0% 0 0 3.407368
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.898451
fluentd (click) 493861 408913 7 116 0 0% 0 0 3.687354
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.49209
graphql (click) 407752 351809 73 1931 19 0% 0 0 52.871802
graphql-native (click) 360992 322105 39 532 0 0% 0 0 13.715457
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.894409
lee (click) 321755 314117 49 1093 0 0% 0 0 30.714446
matmul (click) 11103 4709 8 136 0 0% 0 0 4.081305
nbody (click) 14448 21176 6 251 0 0% 0 0 6.144895
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.301772
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 107.985358
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.867404
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.638628
rack (click) 282433 224125 35 656 0 0% 0 0 16.412835
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.823237
rubyboy (click) 698725 645371 154 6873 42 0% 0 0 164.535595
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.393928
splay (click) 34953 22682 9 175 0 0% 0 0 5.31916
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.7808
tinygql (click) 305175 283484 59 1032 5 0% 0 0 26.550887
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1864.142798
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.717694
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.110414
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.501182
fib (click) 2659 2995 3 30 0 0% 0 0 1.09715
getivar (click) 3789 6778 3 79 0 0% 0 0 2.041643
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.411509
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.826352
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.956153
object-new (click) 2406 2818 2 36 0 0% 0 0 1.054895
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.323507
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.967981
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.2046
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.844999
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.804789
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.340864
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.799592
setivar (click) 2783 3726 3 46 0 0% 0 0 1.279456
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.468125
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.798075
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.52233
structaref (click) 4407 9095 3 88 0 0% 0 0 2.32647
structaset (click) 4113 5834 3 70 0 0% 0 0 1.820648
throw (click) 5953 4624 5 53 0 0% 0 0 1.775097

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.