Ruby Benchmarks

Details for Benchmarks at 2026-03-18 00:54:29 UTC

YJIT metrics from the ruby-bench suite using Ruby 2ebe39fd7e.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 91.4% faster than CRuby 4.1.0dev
  • 5.0% faster than YJIT 3.4.7
On railsbench it is
  • 112.6% faster than CRuby 4.1.0dev
  • 13.7% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 7 minutes
aarch64 runtime: 7 hours, 54 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 99 50 198 50 243
chunky-png 5 31 5 33 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 419 5 435 50 623 50 645
liquid-compile 5 419 5 486 50 583 50 731
liquid-render 5 169 5 177 50 434 50 447
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 197 50 253 50 280
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 161 50 247 50 254
ruby-lsp 5 164 5 161 50 240 50 226
sequel 5 426 5 437 50 586 50 617
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 176 50 183 50 203
addressable-join 5 73 5 80 50 66 50 76
addressable-merge 5 160 5 165 50 221 50 225
addressable-new 5 353 5 362 50 523 50 528
addressable-normalize 5 53 5 56 50 59 50 63
addressable-parse 5 103 5 108 50 104 50 114
addressable-setters 5 184 5 190 50 229 50 241
addressable-to-s 5 163 5 173 50 182 50 205
binarytrees 5 82 5 86 50 136 50 148
blurhash 5 83 5 86 50 143 50 144
erubi 5 140 5 151 50 135 50 153
etanni 5 97 5 74 50 71 50 41
fannkuchredux 5 55 5 53 50 102 50 105
fluentd 5 56 5 65 50 20 50 30
gcbench 5 10 5 10 50 10 50 10
graphql 5 372 5 461 50 528 50 950
graphql-native 5 58 5 88 50 23 50 65
knucleotide 5 162 5 158 50 117 50 112
lee 5 23 5 30 50 10 50 10
matmul 5 51 5 53 50 94 50 95
nbody 5 246 5 272 50 677 50 669
nqueens 5 116 5 129 50 556 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 706 50 778
protoboeuf-encode 5 196 5 196 50 828 50 796
rack 5 436 5 455 50 711 50 730
ruby-json 5 81 5 101 50 47 50 72
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 230 50 243 50 281
sudoku 5 48 5 49 50 157 50 166
tinygql 5 40 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 40 50 450 50 454
attr_accessor 5 157 5 194 50 1833 50 1913
cfunc_itself 5 348 5 358 50 1255 50 1255
fib 5 124 5 143 50 938 50 939
getivar 5 217 5 292 50 2308 50 2403
getivar-module 5 104 5 125 50 90 50 260
keyword_args 5 100 5 107 50 1237 50 1243
loops-times 5 23 5 24 50 64 50 58
object-new 5 268 5 412 50 294 50 916
object-new-initialize 5 168 5 243 50 259 50 761
object-new-no-escape 5 81 5 130 50 89 50 370
respond_to 5 139 5 137 50 3885 50 3904
ruby-xor 5 236 5 241 50 1312 50 1298
send_bmethod 5 117 5 128 50 5538 50 4527
send_cfunc_block 5 106 5 104 50 353 50 384
send_rubyfunc_block 5 250 5 255 50 6926 50 6918
setivar 5 359 5 473 50 4925 50 5038
setivar_object 5 341 5 302 50 751 50 645
setivar_young 5 341 5 306 50 798 50 667
str_concat 5 390 5 427 50 1199 50 1178
structaref 5 156 5 191 50 1809 50 1876
structaset 5 201 5 252 50 395 50 486
throw 5 1088 5 1466 50 1416 50 1948

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) 1549078 1305537 203 2657 0 0% 0 0 75.843114
chunky-png (click) 320421 310744 79 1376 1 0% 0 0 39.235355
erubi-rails (click) 1375226 1147097 268 3621 22 0% 0 0 103.233505
hexapdf (click) 1524234 1335907 594 15714 44 0% 0 0 444.474695
liquid-c (click) 557635 420760 114 2236 5 0% 0 0 59.310455
liquid-compile (click) 480916 414769 146 2753 2 0% 0 0 80.640411
liquid-render (click) 664874 593956 131 2959 8 0% 0 0 79.742848
lobsters (click) 8713106 7377483 3126 64317 120 0% 0 0 2118.525594
mail (click) 870601 853470 345 7728 40 0% 0 0 215.062607
psych-load (click) 287701 272188 61 827 2 0% 0 0 23.552895
railsbench (click) 3348962 2946909 1592 19745 97 0% 0 0 552.411584
rubocop (click) 5782504 5022920 3002 57131 126 0% 6 0 1670.811099
ruby-lsp (click) 1041447 935443 408 7446 46 0% 1 0 207.436904
sequel (click) 502460 445523 11 119 0 0% 0 0 3.858649
shipit (click) 7123157 5960070 3293 53075 146 0% 0 0 1755.534781
addressable-equality (click) 316794 267405 44 1380 1 0% 0 0 34.316602
addressable-getters (click) 277031 218425 26 863 0 0% 0 0 20.948087
addressable-join (click) 282505 251633 24 941 0 0% 0 0 23.556848
addressable-merge (click) 281127 261258 27 896 0 0% 0 0 22.179097
addressable-new (click) 257363 218931 21 563 0 0% 0 0 14.205466
addressable-normalize (click) 312123 245866 43 1329 1 0% 0 0 32.989136
addressable-parse (click) 278434 235693 26 880 0 0% 0 0 21.546857
addressable-setters (click) 245211 216089 20 584 0 0% 0 0 14.530005
addressable-to-s (click) 276739 242094 26 849 0 0% 0 0 20.964223
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.800168
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.044429
erubi (click) 247441 204110 6 134 0 0% 0 0 3.877845
etanni (click) 33076 34952 8 114 0 0% 0 0 3.471917
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.100154
fluentd (click) 487689 386704 7 116 0 0% 0 0 3.69682
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.430343
graphql (click) 408998 372219 73 1909 19 0% 0 0 53.368546
graphql-native (click) 353461 305995 39 532 0 0% 0 0 13.792783
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.723248
lee (click) 304982 230566 49 1099 0 0% 0 0 31.236666
matmul (click) 11103 4709 8 136 0 0% 0 0 4.207921
nbody (click) 14448 21176 6 251 0 0% 0 0 6.223698
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.364511
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.485827
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.763824
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.391659
rack (click) 282947 241957 35 581 0 0% 0 0 15.15693
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.777202
rubyboy (click) 703189 620415 154 6871 42 0% 0 0 168.281774
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.578022
splay (click) 34953 22682 9 175 0 0% 0 0 5.243464
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.93362
tinygql (click) 300420 262074 59 1031 5 0% 0 0 27.639195
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1979.50201
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.384804
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.134857
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.527853
fib (click) 2659 2995 3 30 0 0% 0 0 1.133855
getivar (click) 3789 6778 3 79 0 0% 0 0 1.970098
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.448961
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.777407
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92749
object-new (click) 2406 2818 2 36 0 0% 0 0 1.085176
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.291907
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.992076
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.181811
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.806068
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.83699
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.81967
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.45975
setivar (click) 2783 3726 3 46 0 0% 0 0 1.270828
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.437081
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.748745
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.398689
structaref (click) 4407 9095 3 88 0 0% 0 0 2.348906
structaset (click) 4113 5834 3 70 0 0% 0 0 1.856675
throw (click) 5953 4624 5 53 0 0% 0 0 1.784703

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.