Ruby Benchmarks

Details for Benchmarks at 2026-01-14 00:45:04 UTC

YJIT metrics from the ruby-bench suite using Ruby 4f8478f50c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.8% faster than CRuby 4.1.0dev
  • 4.9% faster than YJIT 3.4.7
On railsbench it is
  • 115.1% faster than CRuby 4.1.0dev
  • 8.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 18 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 91 5 98 50 204 50 235
chunky-png 5 31 5 33 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 419 5 427 50 625 50 623
liquid-compile 5 418 5 470 50 580 50 713
liquid-render 5 172 5 173 50 437 50 442
mail 5 194 5 190 50 253 50 255
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 248 50 248
ruby-lsp 5 155 5 161 50 225 50 225
sequel 5 419 5 426 50 584 50 588
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 12 50 10
addressable-getters 5 164 5 165 50 184 50 190
addressable-join 5 74 5 76 50 64 50 68
addressable-merge 5 161 5 155 50 222 50 217
addressable-new 5 354 5 346 50 525 50 500
addressable-normalize 5 53 5 53 50 60 50 57
addressable-parse 5 104 5 103 50 104 50 105
addressable-setters 5 184 5 178 50 233 50 223
addressable-to-s 5 164 5 165 50 183 50 190
binarytrees 5 82 5 81 50 136 50 129
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 148 50 135 50 150
etanni 5 97 5 70 50 69 50 35
fannkuchredux 5 54 5 55 50 102 50 99
fluentd 5 61 5 60 50 20 50 30
graphql 5 375 5 461 50 565 50 909
graphql-native 5 59 5 84 50 22 50 63
knucleotide 5 163 5 156 50 117 50 110
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 54 50 95 50 94
nbody 5 247 5 277 50 676 50 705
nqueens 5 116 5 127 50 556 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 706 50 733
protoboeuf-encode 5 197 5 208 50 833 50 799
rack 5 437 5 444 50 709 50 685
ruby-json 5 84 5 97 50 50 50 67
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 156 50 156
tinygql 5 42 5 44 50 39 50 49
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 41 50 456 50 457
attr_accessor 5 157 5 190 50 1834 50 1909
cfunc_itself 5 347 5 345 50 1255 50 1259
fib 5 124 5 141 50 939 50 940
getivar 5 217 5 305 50 2315 50 2416
getivar-module 5 104 5 133 50 90 50 266
keyword_args 5 100 5 107 50 1240 50 1242
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 364 50 296 50 676
respond_to 5 139 5 139 50 3881 50 3907
ruby-xor 5 237 5 252 50 1315 50 1290
send_bmethod 5 117 5 123 50 5538 50 4527
send_cfunc_block 5 106 5 107 50 353 50 324
send_rubyfunc_block 5 250 5 243 50 6921 50 6923
setivar 5 360 5 472 50 4927 50 5037
setivar_object 5 341 5 297 50 753 50 544
setivar_young 5 342 5 300 50 795 50 560
str_concat 5 390 5 449 50 1187 50 1208
structaref 5 157 5 185 50 1811 50 1873
structaset 5 203 5 250 50 393 50 496
throw 5 1090 5 1269 50 1416 50 1546

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) 1544070 1322260 203 2643 0 0% 0 0 76.156529
chunky-png (click) 307805 240380 79 1373 1 0% 0 0 38.998657
erubi-rails (click) 1363174 1148115 268 3652 22 0% 0 0 97.837147
hexapdf (click) 1520863 1368220 594 15665 44 0% 0 0 437.705365
liquid-c (click) 556999 529291 114 2228 5 0% 0 0 59.468059
liquid-compile (click) 479683 407101 146 2709 2 0% 0 0 78.265759
liquid-render (click) 663300 554532 131 2946 8 0% 0 0 79.262046
mail (click) 867191 837497 345 7721 40 0% 0 0 213.652491
psych-load (click) 286626 255522 61 828 2 0% 0 0 23.92683
railsbench (click) 3339224 2923377 1591 19707 97 0% 0 0 552.703442
rubocop (click) 5766963 4956781 3002 56950 125 0% 6 0 1664.123324
ruby-lsp (click) 1034900 968300 408 7384 47 0% 1 0 204.629063
sequel (click) 502870 414840 11 119 0 0% 0 0 3.797533
shipit (click) 7441339 6252491 3283 52076 179 0% 0 0 1710.702168
addressable-equality (click) 316742 276680 44 1381 1 0% 0 0 34.229246
addressable-getters (click) 277901 236697 26 869 0 0% 0 0 21.284917
addressable-join (click) 284684 239960 24 1005 0 0% 0 0 25.325637
addressable-merge (click) 282406 255028 27 896 0 0% 0 0 22.160365
addressable-new (click) 259215 230056 21 565 0 0% 0 0 14.160502
addressable-normalize (click) 313705 248710 43 1347 1 0% 0 0 33.565902
addressable-parse (click) 280571 238462 26 886 0 0% 0 0 21.931252
addressable-setters (click) 256180 228437 20 582 0 0% 0 0 14.460745
addressable-to-s (click) 283640 259175 26 971 0 0% 0 0 23.328371
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.809209
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.122465
erubi (click) 234963 224835 6 134 0 0% 0 0 4.007601
etanni (click) 33287 36246 8 113 0 0% 0 0 3.565936
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.102141
fluentd (click) 484173 425070 7 115 0 0% 0 0 3.736862
graphql (click) 411781 322018 73 1921 19 0% 0 0 54.107946
graphql-native (click) 354816 328024 39 532 0 0% 0 0 13.945769
knucleotide (click) 9997 11103 7 113 0 0% 0 0 8.546296
lee (click) 317550 312542 49 1094 0 0% 0 0 31.446472
matmul (click) 11103 4709 8 136 0 0% 0 0 4.265687
nbody (click) 14448 21176 6 251 0 0% 0 0 6.094765
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.416758
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.075893
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.479401
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.606646
rack (click) 282755 268477 35 626 0 0% 0 0 16.340336
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.662936
rubyboy (click) 703603 629162 154 6864 42 0% 0 0 167.858235
rubykon (click) 146229 162118 137 2070 3 0% 0 0 55.812524
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.232214
tinygql (click) 301357 247613 59 1037 5 0% 0 0 27.226697
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1933.444261
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.680662
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.082565
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.491939
fib (click) 2659 2995 3 30 0 0% 0 0 1.159498
getivar (click) 3789 6778 3 79 0 0% 0 0 1.883769
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.350868
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.834628
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.909138
object-new (click) 2406 2818 2 36 0 0% 0 0 1.056028
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.201427
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.806557
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.818972
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.160409
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.483073
setivar (click) 2783 3726 3 46 0 0% 0 0 1.273072
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.416182
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.732731
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.433108
structaref (click) 4407 9095 3 88 0 0% 0 0 2.353389
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787904
throw (click) 5953 4624 5 53 0 0% 0 0 1.82483

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.