Ruby Benchmarks

Details for Benchmarks at 2026-04-28 01:10:08 UTC

YJIT metrics from the ruby-bench suite using Ruby 379b95a2df.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.7% faster than CRuby 4.1.0dev
  • 8.3% faster than YJIT 3.4.7
On railsbench it is
  • 116.7% faster than CRuby 4.1.0dev
  • 16.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 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 91 5 94 50 198 50 236
chunky-png 5 31 5 30 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 419 5 434 50 613 50 660
liquid-compile 5 421 5 483 50 550 50 755
liquid-render 5 174 5 171 50 435 50 458
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 199 50 253 50 287
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 152 50 247 50 247
ruby-lsp 5 164 5 160 50 239 50 231
sequel 5 419 5 445 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 165 50 183 50 196
addressable-join 5 75 5 79 50 64 50 71
addressable-merge 5 162 5 150 50 221 50 221
addressable-new 5 353 5 333 50 521 50 520
addressable-normalize 5 53 5 53 50 60 50 59
addressable-parse 5 103 5 101 50 104 50 109
addressable-setters 5 184 5 174 50 234 50 234
addressable-to-s 5 164 5 164 50 183 50 194
binarytrees 5 82 5 85 50 136 50 164
blurhash 5 84 5 83 50 145 50 145
erubi 5 131 5 146 50 138 50 145
etanni 5 100 5 78 50 72 50 44
fannkuchredux 5 55 5 57 50 100 50 109
fluentd 5 58 5 60 50 22 50 28
gcbench 5 10 5 10 50 10 50 15
graphql 5 369 5 446 50 569 50 952
graphql-native 5 58 5 88 50 22 50 70
knucleotide 5 163 5 147 50 118 50 101
lee 5 23 5 29 50 10 50 13
matmul 5 53 5 57 50 88 50 97
nbody 5 250 5 276 50 661 50 698
nqueens 5 119 5 122 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 698 50 806
protoboeuf-encode 5 200 5 194 50 809 50 809
rack 5 443 5 442 50 711 50 728
ruby-json 5 83 5 107 50 50 50 85
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 224 50 250 50 278
sudoku 5 48 5 49 50 155 50 164
tinygql 5 41 5 41 50 36 50 53
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 455 50 458
attr_accessor 5 157 5 190 50 1833 50 1908
cfunc_itself 5 348 5 319 50 1255 50 1259
fib 5 125 5 132 50 939 50 939
getivar 5 215 5 301 50 2314 50 2413
getivar-module 5 103 5 138 50 89 50 268
keyword_args 5 102 5 103 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 471 50 298 50 1516
object-new-initialize 5 169 5 255 50 260 50 1023
object-new-no-escape 5 80 5 132 50 89 50 516
respond_to 5 139 5 127 50 3906 50 3898
ruby-xor 5 247 5 239 50 1305 50 1306
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 107 50 302 50 293
send_rubyfunc_block 5 196 5 210 50 1372 50 1376
setivar 5 359 5 471 50 4931 50 5037
setivar_object 5 341 5 339 50 763 50 601
setivar_young 5 341 5 339 50 811 50 615
str_concat 5 391 5 411 50 1201 50 1122
structaref 5 153 5 194 50 1799 50 1887
structaset 5 198 5 234 50 369 50 482
throw 5 1109 5 1378 50 1442 50 1793

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) 1561540 1323937 203 2658 0 0% 0 0 78.326785
chunky-png (click) 325194 307320 79 1376 1 0% 0 0 38.057193
erubi-rails (click) 1379757 1254766 268 3626 23 0% 0 0 93.407607
hexapdf (click) 1535719 1355398 594 15784 44 0% 0 0 427.711454
liquid-c (click) 566451 493948 114 2245 5 0% 0 0 59.656234
liquid-compile (click) 488164 461500 146 2758 2 0% 0 0 81.825707
liquid-render (click) 672279 633085 131 2963 8 0% 0 0 77.184621
lobsters (click) 8566967 7286983 3126 63577 122 0% 0 0 2068.696952
mail (click) 876168 834368 345 7738 40 0% 0 0 207.89496
psych-load (click) 290865 234005 61 833 2 0% 0 0 23.363406
railsbench (click) 3355917 2952413 1592 19740 104 0% 0 0 532.652395
rubocop (click) 5789308 5035935 3002 57178 127 0% 6 0 1636.572233
ruby-lsp (click) 1047210 966098 409 7472 47 0% 1 0 198.406963
sequel (click) 507813 459106 11 121 0 0% 0 0 4.50803
shipit (click) 6913453 5905912 3134 50538 147 0% 0 0 1598.078253
addressable-equality (click) 321431 305020 44 1380 1 0% 0 0 36.27707
addressable-getters (click) 282112 248322 26 869 0 0% 0 0 22.556843
addressable-join (click) 287506 265006 24 945 0 0% 0 0 28.744212
addressable-merge (click) 287494 267591 27 900 0 0% 0 0 24.203232
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.44905
addressable-normalize (click) 317360 300602 43 1333 1 0% 0 0 34.449546
addressable-parse (click) 282604 239560 26 882 0 0% 0 0 22.316981
addressable-setters (click) 262012 250420 20 582 0 0% 0 0 15.780766
addressable-to-s (click) 281740 247235 26 853 0 0% 0 0 22.300711
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.741251
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.713901
erubi (click) 252047 208653 6 134 0 0% 0 0 3.867946
etanni (click) 32989 26478 8 114 0 0% 0 0 3.434727
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.836516
fluentd (click) 490199 412814 7 116 0 0% 0 0 3.568049
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.569281
graphql (click) 414960 361693 73 1931 19 0% 0 0 52.765403
graphql-native (click) 358367 310940 39 532 0 0% 0 0 13.607832
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.763179
lee (click) 321596 272782 49 1099 0 0% 0 0 30.233975
matmul (click) 11103 4709 8 136 0 0% 0 0 4.101889
nbody (click) 14448 21176 6 251 0 0% 0 0 6.225395
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.124004
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.159722
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.471176
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.173594
rack (click) 287805 254937 35 581 0 0% 0 0 15.372469
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.783491
rubyboy (click) 709165 666985 154 6877 42 0% 0 0 162.906787
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.158733
splay (click) 34953 22682 9 175 0 0% 0 0 5.269188
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.758331
tinygql (click) 304373 274325 59 1026 5 0% 0 0 26.676809
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1860.737375
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 473.150715
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.092626
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.510949
fib (click) 2659 2995 3 30 0 0% 0 0 1.084427
getivar (click) 3789 6778 3 79 0 0% 0 0 1.884305
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334782
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.790742
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.890277
object-new (click) 2406 2818 2 36 0 0% 0 0 0.98518
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.269263
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.986847
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.119388
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.762203
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.80607
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.233997
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.754682
setivar (click) 2783 3726 3 46 0 0% 0 0 1.25728
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.367357
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.711638
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.382086
structaref (click) 4407 9095 3 88 0 0% 0 0 2.297268
structaset (click) 4113 5834 3 70 0 0% 0 0 1.771744
throw (click) 5953 4624 5 53 0 0% 0 0 1.730146

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.