Ruby Benchmarks

Details for Benchmarks at 2025-11-26 00:40:19 UTC

YJIT metrics from the ruby-bench suite using Ruby 8bf333a199.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 89.6% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 97.0% faster than CRuby 4.0.0dev
  • 1.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 11 minutes
aarch64 runtime: 7 hours, 4 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 84 5 84 50 189 50 211
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 422 5 388 50 626 50 548
liquid-compile 5 415 5 464 50 546 50 717
liquid-render 5 171 5 161 50 414 50 342
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 179 50 253 50 203
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 247 50 251
ruby-lsp 5 137 5 146 50 241 50 241
sequel 5 422 5 442 50 596 50 603
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 165 5 163 50 184 50 185
addressable-join 5 74 5 52 50 66 50 59
addressable-merge 5 161 5 151 50 222 50 209
addressable-new 5 353 5 339 50 523 50 490
addressable-normalize 5 54 5 52 50 60 50 55
addressable-parse 5 103 5 101 50 104 50 102
addressable-setters 5 182 5 177 50 228 50 217
addressable-to-s 5 163 5 163 50 184 50 184
binarytrees 5 82 5 83 50 136 50 129
blurhash 5 83 5 87 50 143 50 145
erubi 5 134 5 137 50 135 50 137
etanni 5 98 5 69 50 71 50 35
fannkuchredux 5 55 5 49 50 102 50 87
fluentd 5 63 5 58 50 29 50 29
graphql 5 373 5 445 50 567 50 920
graphql-native 5 58 5 78 50 23 50 60
knucleotide 5 163 5 159 50 117 50 113
lee 5 23 5 21 50 10 50 10
matmul 5 51 5 53 50 94 50 91
nbody 5 246 5 244 50 676 50 641
nqueens 5 116 5 121 50 556 50 567
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 177 5 188 50 705 50 758
protoboeuf-encode 5 197 5 206 50 832 50 812
rack 5 434 5 449 50 711 50 689
ruby-json 5 82 5 98 50 47 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 156 50 159
tinygql 5 41 5 42 50 40 50 48
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 456 50 457
attr_accessor 5 157 5 199 50 1834 50 1922
cfunc_itself 5 348 5 353 50 1255 50 1259
fib 5 124 5 140 50 939 50 940
getivar 5 214 5 318 50 2314 50 2424
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 54
object-new 5 268 5 315 50 298 50 474
respond_to 5 139 5 135 50 3886 50 3899
ruby-xor 5 237 5 253 50 1313 50 1287
send_bmethod 5 116 5 124 50 5538 50 5543
send_cfunc_block 5 105 5 101 50 353 50 329
send_rubyfunc_block 5 250 5 255 50 6922 50 6928
setivar 5 360 5 385 50 4926 50 4963
setivar_object 5 341 5 330 50 754 50 568
setivar_young 5 341 5 334 50 795 50 587
str_concat 5 391 5 447 50 1201 50 1183
structaref 5 156 5 200 50 1810 50 1888
structaset 5 202 5 231 50 397 50 357
throw 5 1086 5 1153 50 1415 50 1412

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) 1543055 1341667 205 2579 0 0% 0 0 73.204647
chunky-png (click) 321439 272310 79 1373 1 0% 0 0 38.968037
erubi-rails (click) 1372506 1224773 267 3623 22 0% 0 0 96.909325
hexapdf (click) 1525441 1333097 594 15681 44 0% 0 0 445.239086
liquid-c (click) 556566 512614 114 2228 5 0% 0 0 60.21349
liquid-compile (click) 467619 401965 146 2698 2 0% 0 0 79.394645
liquid-render (click) 662929 636279 131 2946 8 0% 0 0 79.104646
lobsters (click) 8537130 7266122 3101 62539 118 0% 0 0 2171.232223
mail (click) 861656 855698 342 7700 40 0% 0 0 213.349349
psych-load (click) 288657 250169 61 828 2 0% 0 0 23.7256
railsbench (click) 3353720 2871195 1605 19564 47 0% 0 0 547.32115
rubocop (click) 5760354 5047825 3001 56858 127 0% 6 0 1655.974001
ruby-lsp (click) 956491 762379 342 6712 44 0% 1 0 181.499009
sequel (click) 503145 423759 11 119 0 0% 0 0 4.083331
shipit (click) 7739116 6529868 3344 53488 181 0% 1 0 1745.332105
addressable-equality (click) 319208 295975 44 1381 1 0% 0 0 34.094909
addressable-getters (click) 276774 252308 26 863 0 0% 0 0 20.761285
addressable-join (click) 282182 236225 24 941 0 0% 0 0 23.419925
addressable-merge (click) 285109 266342 27 898 0 0% 0 0 22.554764
addressable-new (click) 255499 209612 21 563 0 0% 0 0 13.842817
addressable-normalize (click) 317546 285902 43 1372 1 0% 0 0 33.728515
addressable-parse (click) 282270 248792 26 880 0 0% 0 0 21.671748
addressable-setters (click) 259974 241344 20 582 0 0% 0 0 14.280567
addressable-to-s (click) 279166 221300 26 849 0 0% 0 0 20.565755
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.804506
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.010314
erubi (click) 237523 187088 6 134 0 0% 0 0 3.937717
etanni (click) 32930 35718 8 114 0 0% 0 0 3.618934
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.971289
fluentd (click) 490624 434069 7 115 0 0% 0 0 3.767804
graphql (click) 409061 344258 73 1921 19 0% 0 0 53.090208
graphql-native (click) 356832 329064 39 532 0 0% 0 0 13.714169
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.740455
lee (click) 318578 305699 49 1097 0 0% 0 0 31.700143
matmul (click) 11103 4709 8 136 0 0% 0 0 4.187814
nbody (click) 14448 21176 6 251 0 0% 0 0 6.122572
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.324534
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.496178
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 72.641515
protoboeuf-encode (click) 242647 291289 14 1816 0 0% 0 0 44.813934
rack (click) 279421 222804 35 580 0 0% 0 0 15.133615
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.711381
rubyboy (click) 704007 630348 154 6862 42 0% 0 0 165.659383
rubykon (click) 146229 153926 137 2070 3 0% 0 0 55.908417
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.640612
tinygql (click) 301262 247803 59 1031 5 0% 0 0 26.900761
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1922.262924
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.808943
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.075326
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.508127
fib (click) 2659 2995 3 30 0 0% 0 0 1.137811
getivar (click) 3789 6778 3 79 0 0% 0 0 1.956477
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.825626
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.918127
object-new (click) 2406 2818 2 36 0 0% 0 0 1.173269
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13945
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.880686
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.740896
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.282085
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.484899
setivar (click) 2783 3726 3 46 0 0% 0 0 1.25127
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.425254
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.724878
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.454004
structaref (click) 4407 9095 3 88 0 0% 0 0 2.361132
structaset (click) 3926 5614 3 70 0 0% 0 0 1.745045
throw (click) 5953 4624 5 53 0 0% 0 0 1.818552

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.