Ruby Benchmarks

Details for Benchmarks at 2025-11-27 00:39:32 UTC

YJIT metrics from the ruby-bench suite using Ruby a60cd8787c.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 91.3% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 101.1% faster than CRuby 4.0.0dev
  • 2.5% 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 85 50 193 50 211
chunky-png 5 31 5 32 50 32 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 395 50 624 50 562
liquid-compile 5 415 5 462 50 543 50 716
liquid-render 5 171 5 164 50 438 50 368
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 176 50 252 50 200
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 246 50 249
ruby-lsp 5 140 5 147 50 237 50 241
sequel 5 422 5 435 50 580 50 606
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 164 5 163 50 183 50 186
addressable-join 5 71 5 52 50 64 50 64
addressable-merge 5 161 5 151 50 222 50 210
addressable-new 5 354 5 338 50 524 50 488
addressable-normalize 5 53 5 53 50 59 50 55
addressable-parse 5 103 5 101 50 104 50 101
addressable-setters 5 185 5 175 50 229 50 217
addressable-to-s 5 163 5 163 50 183 50 185
binarytrees 5 82 5 83 50 136 50 131
blurhash 5 83 5 87 50 143 50 145
erubi 5 134 5 138 50 135 50 141
etanni 5 99 5 70 50 72 50 36
fannkuchredux 5 54 5 49 50 102 50 87
fluentd 5 56 5 60 50 20 50 31
graphql 5 371 5 444 50 573 50 921
graphql-native 5 59 5 79 50 23 50 65
knucleotide 5 163 5 161 50 118 50 116
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 95 50 91
nbody 5 247 5 249 50 676 50 666
nqueens 5 116 5 126 50 557 50 568
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 705 50 750
protoboeuf-encode 5 197 5 204 50 834 50 801
rack 5 439 5 439 50 708 50 688
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 158
tinygql 5 40 5 43 50 37 50 48
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 40 50 453 50 456
attr_accessor 5 157 5 219 50 1834 50 1951
cfunc_itself 5 347 5 353 50 1255 50 1259
fib 5 124 5 142 50 940 50 939
getivar 5 215 5 326 50 2314 50 2433
keyword_args 5 99 5 107 50 1240 50 1242
loops-times 5 23 5 26 50 64 50 56
object-new 5 268 5 314 50 297 50 466
respond_to 5 139 5 139 50 3891 50 3901
ruby-xor 5 236 5 250 50 1314 50 1289
send_bmethod 5 116 5 123 50 5539 50 5545
send_cfunc_block 5 105 5 100 50 353 50 331
send_rubyfunc_block 5 250 5 256 50 6921 50 6925
setivar 5 360 5 395 50 4926 50 4975
setivar_object 5 344 5 335 50 750 50 571
setivar_young 5 341 5 338 50 794 50 592
str_concat 5 390 5 465 50 1200 50 1191
structaref 5 156 5 218 50 1812 50 1917
structaset 5 201 5 237 50 396 50 355
throw 5 1085 5 1135 50 1405 50 1391

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) 1548200 1330737 205 2579 0 0% 0 0 73.488061
chunky-png (click) 321439 272310 79 1373 1 0% 0 0 39.079615
erubi-rails (click) 1378852 1183341 267 3644 22 0% 0 0 96.976962
hexapdf (click) 1523415 1339137 594 15657 44 0% 0 0 435.419439
liquid-c (click) 556566 512614 114 2228 5 0% 0 0 60.231855
liquid-compile (click) 477564 446070 146 2689 2 0% 0 0 78.274588
liquid-render (click) 663173 571030 131 2946 8 0% 0 0 79.695709
lobsters (click) 8516354 7319678 3103 62332 118 0% 0 0 2178.195894
mail (click) 865542 827519 342 7700 40 0% 0 0 213.249157
psych-load (click) 288547 233698 61 828 2 0% 0 0 23.542361
railsbench (click) 3367641 2864012 1605 19689 47 0% 0 0 551.2471
rubocop (click) 5761734 5032059 3001 56859 127 0% 6 0 1685.529757
ruby-lsp (click) 959219 822423 342 6701 44 0% 1 0 180.57293
sequel (click) 503504 432328 11 119 0 0% 0 0 4.164992
shipit (click) 7423250 6277431 3264 51888 178 0% 0 0 1715.727569
addressable-equality (click) 319208 279591 44 1381 1 0% 0 0 34.12947
addressable-getters (click) 279558 246922 26 863 0 0% 0 0 20.981344
addressable-join (click) 284966 255415 24 941 0 0% 0 0 23.695991
addressable-merge (click) 284992 241584 27 896 0 0% 0 0 22.288639
addressable-new (click) 260016 214721 21 569 0 0% 0 0 14.210868
addressable-normalize (click) 317580 286399 43 1372 1 0% 0 0 33.563257
addressable-parse (click) 282270 232408 26 880 0 0% 0 0 21.998369
addressable-setters (click) 259842 216663 20 584 0 0% 0 0 14.74666
addressable-to-s (click) 279166 221300 26 849 0 0% 0 0 20.755801
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.839862
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.010619
erubi (click) 248592 191328 6 134 0 0% 0 0 4.023083
etanni (click) 32930 35718 8 114 0 0% 0 0 3.616871
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.016022
fluentd (click) 483283 450487 7 115 0 0% 0 0 3.788194
graphql (click) 410690 362176 73 1921 19 0% 0 0 53.691342
graphql-native (click) 355239 279695 39 532 0 0% 0 0 13.876191
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.888139
lee (click) 318622 313920 49 1097 0 0% 0 0 31.481783
matmul (click) 11103 4709 8 136 0 0% 0 0 4.218079
nbody (click) 14448 21176 6 251 0 0% 0 0 6.124082
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.361286
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.697418
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 72.996439
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 44.304856
rack (click) 281168 232869 35 580 0 0% 0 0 14.929847
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.814783
rubyboy (click) 704259 638827 154 6862 42 0% 0 0 166.806384
rubykon (click) 146229 153926 137 2070 3 0% 0 0 56.067628
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.712227
tinygql (click) 301262 247803 59 1031 5 0% 0 0 27.227942
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1928.146826
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.572055
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.124182
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498304
fib (click) 2659 2995 3 30 0 0% 0 0 1.136219
getivar (click) 3789 6778 3 79 0 0% 0 0 1.924015
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.882146
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.937327
object-new (click) 2406 2818 2 36 0 0% 0 0 1.141836
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.156544
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.850961
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.779722
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.290409
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.510455
setivar (click) 2783 3726 3 46 0 0% 0 0 1.282128
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.421281
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.731465
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.47318
structaref (click) 4407 9095 3 88 0 0% 0 0 2.355426
structaset (click) 3926 5614 3 70 0 0% 0 0 1.743217
throw (click) 5953 4624 5 53 0 0% 0 0 1.86413

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.