Ruby Benchmarks

Details for Benchmarks at 2026-05-02 01:07:32 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.8% faster than CRuby 4.1.0dev
  • 8.6% faster than YJIT 3.4.7
On railsbench it is
  • 113.5% faster than CRuby 4.1.0dev
  • 13.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 hours, 49 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 89 5 95 50 198 50 242
chunky-png 5 32 5 31 50 34 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 434 50 619 50 673
liquid-compile 5 421 5 485 50 545 50 741
liquid-render 5 168 5 170 50 411 50 464
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 199 50 253 50 289
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 245
ruby-lsp 5 159 5 162 50 225 50 228
sequel 5 419 5 450 50 594 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 166 50 183 50 197
addressable-join 5 75 5 79 50 66 50 71
addressable-merge 5 161 5 151 50 222 50 222
addressable-new 5 353 5 336 50 517 50 519
addressable-normalize 5 53 5 54 50 60 50 59
addressable-parse 5 104 5 103 50 104 50 110
addressable-setters 5 185 5 175 50 235 50 234
addressable-to-s 5 164 5 166 50 182 50 196
binarytrees 5 82 5 87 50 136 50 168
blurhash 5 84 5 84 50 145 50 145
erubi 5 141 5 151 50 135 50 153
etanni 5 100 5 80 50 73 50 47
fannkuchredux 5 55 5 57 50 100 50 103
fluentd 5 58 5 60 50 20 50 33
gcbench 5 10 5 10 50 10 50 15
graphql 5 369 5 446 50 568 50 913
graphql-native 5 57 5 87 50 21 50 70
knucleotide 5 163 5 143 50 118 50 97
lee 5 23 5 30 50 10 50 15
matmul 5 53 5 54 50 88 50 86
nbody 5 249 5 288 50 663 50 657
nqueens 5 119 5 124 50 554 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 698 50 824
protoboeuf-encode 5 200 5 196 50 803 50 811
rack 5 433 5 448 50 708 50 729
ruby-json 5 84 5 107 50 50 50 84
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 207 5 226 50 250 50 281
sudoku 5 48 5 49 50 155 50 156
tinygql 5 41 5 41 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 458 50 453
attr_accessor 5 157 5 169 50 1835 50 1872
cfunc_itself 5 348 5 323 50 1255 50 1259
fib 5 124 5 137 50 939 50 939
getivar 5 210 5 349 50 2306 50 2450
getivar-module 5 103 5 145 50 89 50 272
keyword_args 5 102 5 102 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 60
object-new 5 268 5 471 50 298 50 1517
object-new-initialize 5 169 5 254 50 259 50 1026
object-new-no-escape 5 80 5 139 50 89 50 510
respond_to 5 139 5 117 50 3900 50 3905
ruby-xor 5 247 5 233 50 1306 50 1309
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 107 50 305 50 264
send_rubyfunc_block 5 196 5 212 50 1372 50 1376
setivar 5 359 5 476 50 4929 50 5041
setivar_object 5 341 5 347 50 761 50 665
setivar_young 5 341 5 347 50 807 50 692
str_concat 5 390 5 458 50 1206 50 1168
structaref 5 153 5 171 50 1799 50 1842
structaset 5 198 5 216 50 369 50 477
throw 5 1110 5 1400 50 1440 50 1794

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) 1554620 1312937 203 2675 0 0% 0 0 74.413602
chunky-png (click) 324915 307092 79 1376 1 0% 0 0 38.110823
erubi-rails (click) 1379950 1247284 268 3626 23 0% 0 0 94.17922
hexapdf (click) 1537719 1365630 594 15807 44 0% 0 0 430.596291
liquid-c (click) 564287 491099 114 2240 5 0% 0 0 58.553809
liquid-compile (click) 488982 445796 146 2764 2 0% 0 0 86.056098
liquid-render (click) 662892 669948 131 2963 8 0% 0 0 77.639952
lobsters (click) 8583301 7141174 3125 63719 122 0% 0 0 2043.62069
mail (click) 876352 850882 345 7738 40 0% 0 0 208.764823
psych-load (click) 289085 239881 61 833 2 0% 0 0 23.355839
railsbench (click) 3359691 2818615 1592 19747 104 0% 0 0 568.696526
rubocop (click) 5788193 4936573 3002 57178 127 0% 6 0 1640.854318
ruby-lsp (click) 1046797 916411 409 7472 47 0% 1 0 199.934076
sequel (click) 507813 459106 11 121 0 0% 0 0 3.79303
shipit (click) 7201806 6098000 3117 50091 148 0% 0 0 1605.474753
addressable-equality (click) 321249 272042 44 1380 1 0% 0 0 34.435341
addressable-getters (click) 280037 262064 26 863 0 0% 0 0 21.444834
addressable-join (click) 285775 262699 24 945 0 0% 0 0 27.186659
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 24.810207
addressable-new (click) 260793 254784 21 569 0 0% 0 0 14.102834
addressable-normalize (click) 309750 257522 43 1362 1 0% 0 0 34.622419
addressable-parse (click) 275084 229336 26 880 0 0% 0 0 22.570674
addressable-setters (click) 262194 250590 20 582 0 0% 0 0 16.555357
addressable-to-s (click) 281740 247235 26 853 0 0% 0 0 21.703408
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.717558
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.899468
erubi (click) 251950 200403 6 134 0 0% 0 0 3.914333
etanni (click) 32752 34339 8 114 0 0% 0 0 3.401995
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.770372
fluentd (click) 490017 461716 7 116 0 0% 0 0 3.611446
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.575391
graphql (click) 412848 367307 73 1931 19 0% 0 0 52.382317
graphql-native (click) 356241 316471 39 532 0 0% 0 0 13.718031
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.730986
lee (click) 302814 282959 49 1099 0 0% 0 0 30.004379
matmul (click) 11103 4709 8 136 0 0% 0 0 4.069408
nbody (click) 14448 21176 6 251 0 0% 0 0 6.136379
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.195574
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.254301
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.474265
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.226187
rack (click) 288087 271501 35 586 0 0% 0 0 16.307005
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.841845
rubyboy (click) 708824 601120 154 6871 42 0% 0 0 162.994198
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.111897
splay (click) 34953 22682 9 175 0 0% 0 0 5.211077
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.851993
tinygql (click) 304902 274818 59 1032 5 0% 0 0 26.852636
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1861.659844
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.292513
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.09347
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498499
fib (click) 2659 2995 3 30 0 0% 0 0 1.097863
getivar (click) 3789 6778 3 79 0 0% 0 0 1.935015
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334517
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.820742
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.897725
object-new (click) 2406 2818 2 36 0 0% 0 0 0.990746
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.260637
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.98082
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.154178
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799271
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.81081
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.309575
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.715917
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261728
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.423804
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.731776
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.430782
structaref (click) 4407 9095 3 88 0 0% 0 0 2.339919
structaset (click) 4113 5834 3 70 0 0% 0 0 1.79703
throw (click) 5953 4624 5 53 0 0% 0 0 1.761545

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.