Ruby Benchmarks

Details for Benchmarks at 2025-12-14 00:45:38 UTC

YJIT metrics from the ruby-bench suite using Ruby 0159a98bc1.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 95.0% faster than CRuby 4.0.0dev
  • 4.4% faster than YJIT 3.4.7
On railsbench it is
  • 111.4% faster than CRuby 4.0.0dev
  • 8.8% 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 89 5 98 50 190 50 238
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 426 50 629 50 617
liquid-compile 5 406 5 458 50 585 50 680
liquid-render 5 172 5 175 50 435 50 426
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 188 50 253 50 249
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 247 50 250
ruby-lsp 5 137 5 148 50 227 50 249
sequel 5 426 5 425 50 598 50 591
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 163 5 165 50 184 50 184
addressable-join 5 72 5 75 50 64 50 65
addressable-merge 5 159 5 155 50 221 50 209
addressable-new 5 352 5 348 50 527 50 502
addressable-normalize 5 53 5 54 50 60 50 53
addressable-parse 5 103 5 103 50 104 50 102
addressable-setters 5 183 5 177 50 232 50 217
addressable-to-s 5 163 5 165 50 182 50 186
binarytrees 5 82 5 83 50 136 50 135
blurhash 5 83 5 86 50 143 50 144
erubi 5 130 5 147 50 138 50 145
etanni 5 97 5 69 50 71 50 33
fannkuchredux 5 54 5 57 50 102 50 98
fluentd 5 56 5 58 50 27 50 23
graphql 5 373 5 478 50 574 50 924
graphql-native 5 57 5 83 50 20 50 64
knucleotide 5 164 5 153 50 118 50 107
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 55 50 94 50 91
nbody 5 246 5 284 50 677 50 705
nqueens 5 116 5 120 50 556 50 567
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 180 50 706 50 664
protoboeuf-encode 5 197 5 205 50 829 50 788
rack 5 436 5 446 50 723 50 677
ruby-json 5 82 5 95 50 46 50 68
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 156 50 151
tinygql 5 39 5 44 50 35 50 47
30k_ifelse 5 28 5 28 50 185 50 181
30k_methods 5 38 5 40 50 457 50 453
attr_accessor 5 157 5 199 50 1835 50 1926
cfunc_itself 5 348 5 364 50 1255 50 1259
fib 5 124 5 128 50 939 50 939
getivar 5 216 5 312 50 2318 50 2418
getivar-module 5 103 5 136 50 90 50 267
keyword_args 5 100 5 110 50 1240 50 1242
loops-times 5 23 5 25 50 64 50 55
object-new 5 268 5 355 50 298 50 664
respond_to 5 139 5 139 50 3886 50 3899
ruby-xor 5 237 5 242 50 1314 50 1294
send_bmethod 5 116 5 126 50 5538 50 5542
send_cfunc_block 5 106 5 107 50 353 50 344
send_rubyfunc_block 5 250 5 254 50 6922 50 6931
setivar 5 360 5 394 50 4925 50 4974
setivar_object 5 341 5 357 50 752 50 587
setivar_young 5 342 5 358 50 798 50 619
str_concat 5 391 5 456 50 1200 50 1098
structaref 5 156 5 210 50 1812 50 1918
structaset 5 202 5 231 50 397 50 355
throw 5 1090 5 1220 50 1412 50 1597

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) 1543075 1345064 203 2648 0 0% 0 0 75.488634
chunky-png (click) 319550 302438 79 1373 1 0% 0 0 39.060933
erubi-rails (click) 1363711 1286497 268 3624 22 0% 0 0 96.642415
hexapdf (click) 1526579 1332451 593 15676 44 0% 0 0 440.104504
liquid-c (click) 556881 471577 114 2228 5 0% 0 0 59.77444
liquid-compile (click) 479768 399156 146 2725 2 0% 0 0 78.383136
liquid-render (click) 663314 578833 131 2946 8 0% 0 0 79.430558
lobsters (click) 8652515 7266605 3114 63940 117 0% 0 0 2104.754773
mail (click) 863817 800304 342 7700 40 0% 0 0 213.837671
psych-load (click) 286785 263893 61 828 2 0% 0 0 24.067097
railsbench (click) 3346962 2948504 1590 19820 97 0% 0 0 556.47778
rubocop (click) 5762293 5024083 3002 56873 127 0% 6 0 1662.900914
ruby-lsp (click) 958421 878533 342 6701 44 0% 1 0 180.01595
sequel (click) 499397 427087 11 119 0 0% 0 0 4.089495
shipit (click) 7597334 6370842 3268 51900 181 0% 0 0 1721.16421
addressable-equality (click) 319493 263055 44 1397 1 0% 0 0 34.262405
addressable-getters (click) 279053 237585 26 863 0 0% 0 0 20.943252
addressable-join (click) 284427 254270 24 941 0 0% 0 0 23.45708
addressable-merge (click) 284453 240459 27 896 0 0% 0 0 22.334743
addressable-new (click) 259289 221568 21 563 0 0% 0 0 13.978227
addressable-normalize (click) 310426 236357 43 1330 1 0% 0 0 32.997151
addressable-parse (click) 280548 229887 26 880 0 0% 0 0 21.625357
addressable-setters (click) 259479 223844 20 582 0 0% 0 0 14.63742
addressable-to-s (click) 278445 219924 26 849 0 0% 0 0 20.756955
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.861175
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.742244
erubi (click) 247871 214611 6 134 0 0% 0 0 3.910921
etanni (click) 33385 36322 8 114 0 0% 0 0 3.589796
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.827026
fluentd (click) 485325 451008 7 115 0 0% 0 0 3.754303
graphql (click) 409936 352669 73 1921 19 0% 0 0 53.99959
graphql-native (click) 354464 270041 39 532 0 0% 0 0 14.043855
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.44521
lee (click) 317918 296194 49 1097 0 0% 0 0 31.642957
matmul (click) 11103 4709 8 136 0 0% 0 0 4.223081
nbody (click) 14448 21176 6 251 0 0% 0 0 6.103773
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.167159
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.026799
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.519702
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.616508
rack (click) 283714 268936 35 631 0 0% 0 0 16.521443
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.613643
rubyboy (click) 705684 647977 154 6864 42 0% 0 0 166.993849
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.626343
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.380442
tinygql (click) 300301 246311 59 1031 5 0% 0 0 27.392787
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1927.875878
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.491293
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.086005
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.53927
fib (click) 2659 2995 3 30 0 0% 0 0 1.140993
getivar (click) 3789 6778 3 79 0 0% 0 0 1.942795
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.288315
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823909
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.920493
object-new (click) 2406 2818 2 36 0 0% 0 0 1.02534
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.10457
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.854762
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.761964
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.286352
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.450327
setivar (click) 2783 3726 3 46 0 0% 0 0 1.273701
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.413853
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.749701
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.497361
structaref (click) 4407 9095 3 88 0 0% 0 0 2.334082
structaset (click) 3926 5614 3 70 0 0% 0 0 1.749069
throw (click) 5953 4624 5 53 0 0% 0 0 1.790478

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.