Ruby Benchmarks

Details for Benchmarks at 2026-02-14 00:50:56 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.0% faster than CRuby 4.1.0dev
  • 5.5% faster than YJIT 3.4.7
On railsbench it is
  • 114.5% faster than CRuby 4.1.0dev
  • 11.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 11 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 100 50 204 50 230
chunky-png 5 31 5 33 50 33 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 425 5 434 50 624 50 642
liquid-compile 5 415 5 479 50 583 50 733
liquid-render 5 171 5 176 50 436 50 445
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 197 50 253 50 271
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 160 50 247 50 252
ruby-lsp 5 164 5 163 50 231 50 232
sequel 5 427 5 438 50 604 50 627
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 163 5 172 50 183 50 203
addressable-join 5 73 5 77 50 66 50 71
addressable-merge 5 160 5 161 50 222 50 222
addressable-new 5 353 5 361 50 514 50 537
addressable-normalize 5 53 5 54 50 59 50 60
addressable-parse 5 103 5 108 50 104 50 110
addressable-setters 5 185 5 186 50 229 50 239
addressable-to-s 5 164 5 171 50 182 50 201
binarytrees 5 82 5 88 50 136 50 147
blurhash 5 83 5 86 50 143 50 144
erubi 5 134 5 145 50 140 50 145
etanni 5 98 5 72 50 71 50 39
fannkuchredux 5 55 5 53 50 102 50 103
fluentd 5 62 5 62 50 22 50 32
graphql 5 369 5 465 50 569 50 937
graphql-native 5 58 5 89 50 21 50 69
knucleotide 5 163 5 157 50 117 50 111
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 247 5 291 50 679 50 703
nqueens 5 116 5 126 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 707 50 761
protoboeuf-encode 5 197 5 205 50 831 50 821
rack 5 439 5 453 50 713 50 721
ruby-json 5 82 5 101 50 47 50 72
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 48 50 156 50 158
tinygql 5 41 5 45 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 448 50 456
attr_accessor 5 157 5 195 50 1832 50 1914
cfunc_itself 5 349 5 361 50 1255 50 1259
fib 5 124 5 144 50 938 50 939
getivar 5 217 5 311 50 2313 50 2418
getivar-module 5 103 5 133 50 90 50 266
keyword_args 5 99 5 109 50 1240 50 1243
loops-times 5 23 5 27 50 63 50 62
object-new 5 268 5 414 50 295 50 922
respond_to 5 139 5 141 50 3887 50 3907
ruby-xor 5 236 5 248 50 1313 50 1288
send_bmethod 5 117 5 125 50 5539 50 4527
send_cfunc_block 5 106 5 107 50 353 50 370
send_rubyfunc_block 5 249 5 253 50 6924 50 6931
setivar 5 359 5 481 50 4926 50 5044
setivar_object 5 341 5 305 50 755 50 551
setivar_young 5 341 5 308 50 799 50 568
str_concat 5 391 5 467 50 1200 50 1176
structaref 5 157 5 201 50 1810 50 1899
structaset 5 200 5 263 50 397 50 493
throw 5 1091 5 1385 50 1416 50 1818

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) 1552426 1349614 203 2645 0 0% 0 0 75.473076
chunky-png (click) 319719 285634 79 1376 1 0% 0 0 38.995095
erubi-rails (click) 1380934 1194048 269 3669 22 0% 0 0 98.174425
hexapdf (click) 1527412 1323268 593 15710 44 0% 0 0 435.492984
liquid-c (click) 558862 497092 114 2236 5 0% 0 0 59.729728
liquid-compile (click) 481201 440226 146 2721 2 0% 0 0 80.035533
liquid-render (click) 665605 563242 131 2959 8 0% 0 0 79.829574
lobsters (click) 8676206 7489905 3123 63911 119 0% 0 0 2205.095066
mail (click) 871691 806102 345 7728 40 0% 0 0 214.494557
psych-load (click) 279446 246544 61 831 2 0% 0 0 23.755104
railsbench (click) 3354527 2894884 1592 19786 97 0% 0 0 551.742801
rubocop (click) 5781021 4996326 3002 57091 126 0% 6 0 1662.084558
ruby-lsp (click) 1040889 952278 408 7446 46 0% 1 0 204.718123
sequel (click) 497843 458730 11 119 0 0% 0 0 3.932154
addressable-equality (click) 317246 276816 44 1380 1 0% 0 0 34.179987
addressable-getters (click) 278147 244869 26 869 0 0% 0 0 20.99881
addressable-join (click) 282996 220069 24 941 0 0% 0 0 23.625619
addressable-merge (click) 283125 239130 27 896 0 0% 0 0 22.207288
addressable-new (click) 259326 221926 21 591 0 0% 0 0 14.724589
addressable-normalize (click) 303506 293801 43 1327 1 0% 0 0 32.452646
addressable-parse (click) 280273 246161 26 880 0 0% 0 0 21.595147
addressable-setters (click) 258054 197840 20 582 0 0% 0 0 14.538852
addressable-to-s (click) 277327 243417 26 849 0 0% 0 0 20.62847
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.82623
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.162144
erubi (click) 243845 202973 6 134 0 0% 0 0 3.895676
etanni (click) 33355 27108 8 114 0 0% 0 0 3.429518
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.002106
fluentd (click) 487528 443999 7 116 0 0% 0 0 3.774047
graphql (click) 410313 358416 73 1909 19 0% 0 0 53.796662
graphql-native (click) 354742 308547 39 532 0 0% 0 0 14.376198
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.931745
lee (click) 317906 261548 49 1099 0 0% 0 0 31.092051
matmul (click) 11103 4709 8 136 0 0% 0 0 4.185993
nbody (click) 14448 21176 6 251 0 0% 0 0 6.124649
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.289579
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.41383
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.106772
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.429178
rack (click) 284329 252069 35 586 0 0% 0 0 15.210798
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.670741
rubyboy (click) 707853 615847 154 6873 42 0% 0 0 166.974961
rubykon (click) 148777 155950 138 2107 4 0% 0 0 56.347804
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.991312
tinygql (click) 301157 288192 59 1031 5 0% 0 0 27.224026
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1936.880344
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.860697
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.098697
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.481134
fib (click) 2659 2995 3 30 0 0% 0 0 1.111933
getivar (click) 3789 6778 3 79 0 0% 0 0 1.923427
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.28427
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.82341
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92428
object-new (click) 2406 2818 2 36 0 0% 0 0 1.105681
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.140231
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.80635
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.773885
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.797136
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.45756
setivar (click) 2783 3726 3 46 0 0% 0 0 1.245166
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.430107
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.723539
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.416539
structaref (click) 4407 9095 3 88 0 0% 0 0 2.378816
structaset (click) 4113 5834 3 70 0 0% 0 0 1.767036
throw (click) 5953 4624 5 53 0 0% 0 0 1.859359

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.