Ruby Benchmarks

Details for Benchmarks at 2025-12-07 00:45:26 UTC

YJIT metrics from the ruby-bench suite using Ruby 33837abb81.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 94.0% faster than CRuby 4.0.0dev
  • 1.5% faster than YJIT 3.4.7
On railsbench it is
  • 99.8% 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 83 5 86 50 196 50 227
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 421 5 378 50 620 50 556
liquid-compile 5 415 5 476 50 546 50 683
liquid-render 5 168 5 165 50 413 50 344
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 152 50 252 50 210
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 159 50 246 50 250
ruby-lsp 5 140 5 148 50 228 50 249
sequel 5 419 5 442 50 583 50 615
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 164 5 166 50 183 50 189
addressable-join 5 74 5 51 50 66 50 18
addressable-merge 5 160 5 154 50 222 50 213
addressable-new 5 356 5 338 50 518 50 495
addressable-normalize 5 53 5 53 50 59 50 57
addressable-parse 5 103 5 102 50 104 50 104
addressable-setters 5 184 5 179 50 229 50 215
addressable-to-s 5 163 5 164 50 183 50 187
binarytrees 5 82 5 84 50 136 50 133
blurhash 5 83 5 88 50 143 50 145
erubi 5 134 5 140 50 135 50 122
etanni 5 98 5 69 50 71 50 35
fannkuchredux 5 54 5 56 50 102 50 96
fluentd 5 56 5 61 50 29 50 30
graphql 5 374 5 461 50 578 50 932
graphql-native 5 59 5 80 50 23 50 62
knucleotide 5 162 5 160 50 118 50 113
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 95 50 91
nbody 5 247 5 263 50 676 50 663
nqueens 5 116 5 118 50 556 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 188 50 706 50 768
protoboeuf-encode 5 197 5 210 50 837 50 808
rack 5 438 5 444 50 712 50 697
ruby-json 5 82 5 100 50 47 50 69
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 147
tinygql 5 40 5 44 50 36 50 49
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 38 5 40 50 453 50 453
attr_accessor 5 157 5 213 50 1835 50 1944
cfunc_itself 5 347 5 374 50 1255 50 1259
fib 5 124 5 139 50 939 50 939
getivar 5 215 5 320 50 2315 50 2429
getivar-module 5 104 5 140 50 90 50 269
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 57
object-new 5 268 5 319 50 299 50 500
respond_to 5 139 5 141 50 3885 50 3898
ruby-xor 5 237 5 258 50 1313 50 1292
send_bmethod 5 116 5 125 50 5539 50 5544
send_cfunc_block 5 105 5 104 50 353 50 345
send_rubyfunc_block 5 251 5 255 50 6923 50 6927
setivar 5 360 5 397 50 4925 50 4977
setivar_object 5 341 5 337 50 752 50 614
setivar_young 5 341 5 339 50 799 50 639
str_concat 5 390 5 451 50 1199 50 1129
structaref 5 156 5 216 50 1813 50 1919
structaset 5 201 5 243 50 396 50 358
throw 5 1089 5 1183 50 1416 50 1434

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) 1547984 1312372 205 2579 0 0% 0 0 72.963305
chunky-png (click) 319779 269950 79 1373 1 0% 0 0 38.976687
erubi-rails (click) 1373646 1127426 267 3623 22 0% 0 0 97.160594
hexapdf (click) 1522074 1361542 594 15660 44 0% 0 0 438.627348
liquid-c (click) 555083 436853 114 2228 5 0% 0 0 60.50098
liquid-compile (click) 477347 437485 146 2715 2 0% 0 0 79.744813
liquid-render (click) 661526 560591 131 2946 8 0% 0 0 81.203453
lobsters (click) 8528329 7109504 3100 62443 118 0% 0 0 2110.435329
mail (click) 863882 792366 342 7700 40 0% 0 0 213.387492
psych-load (click) 286997 231405 61 828 2 0% 0 0 23.631822
railsbench (click) 3354859 2898641 1605 19587 47 0% 0 0 548.866104
rubocop (click) 5763284 4942192 3002 56872 126 0% 6 0 1663.461466
ruby-lsp (click) 957757 820433 342 6701 44 0% 1 0 181.411225
sequel (click) 501546 445959 11 119 0 0% 0 0 3.972638
shipit (click) 7495151 6324251 3266 52035 181 0% 0 0 1741.329347
addressable-equality (click) 317548 244483 44 1381 1 0% 0 0 34.12262
addressable-getters (click) 277945 236475 26 863 0 0% 0 0 20.882818
addressable-join (click) 283301 236666 24 941 0 0% 0 0 23.805377
addressable-merge (click) 283493 239455 27 898 0 0% 0 0 22.056574
addressable-new (click) 258168 212181 21 563 0 0% 0 0 13.972919
addressable-normalize (click) 313008 305146 43 1328 1 0% 0 0 32.628342
addressable-parse (click) 280771 230279 26 882 0 0% 0 0 21.878983
addressable-setters (click) 258358 214457 20 582 0 0% 0 0 14.414632
addressable-to-s (click) 277501 251723 26 849 0 0% 0 0 20.611733
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.836457
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.887124
erubi (click) 246932 188915 6 134 0 0% 0 0 3.989504
etanni (click) 32930 35718 8 114 0 0% 0 0 3.629463
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.042653
fluentd (click) 480541 406065 7 115 0 0% 0 0 3.777535
graphql (click) 409119 351649 73 1921 19 0% 0 0 54.10795
graphql-native (click) 353574 301813 39 532 0 0% 0 0 13.790631
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.813691
lee (click) 316957 270555 49 1097 0 0% 0 0 31.812559
matmul (click) 11103 4709 8 136 0 0% 0 0 4.220564
nbody (click) 14448 21176 6 251 0 0% 0 0 6.135135
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.325456
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.883144
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.028471
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.424607
rack (click) 279850 230802 35 580 0 0% 0 0 16.033058
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.784006
rubyboy (click) 703063 620669 154 6866 42 0% 0 0 166.666111
rubykon (click) 145449 177646 137 2062 3 0% 0 0 55.57557
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.513462
tinygql (click) 291045 252234 59 1031 5 0% 0 0 27.31984
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1929.423533
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.978557
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090631
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.51499
fib (click) 2659 2995 3 30 0 0% 0 0 1.154032
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936137
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.281932
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.833739
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.891511
object-new (click) 2406 2818 2 36 0 0% 0 0 1.146423
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.156254
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.844055
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.716733
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.298028
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.497585
setivar (click) 2783 3726 3 46 0 0% 0 0 1.279455
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.441872
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.747027
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.415358
structaref (click) 4407 9095 3 88 0 0% 0 0 2.34341
structaset (click) 3926 5614 3 70 0 0% 0 0 1.734429
throw (click) 5953 4624 5 53 0 0% 0 0 1.810522

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.