Ruby Benchmarks

Details for Benchmarks at 2025-11-21 00:39:48 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 88.7% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 99.5% faster than CRuby 4.0.0dev
  • 2.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 14 minutes
aarch64 runtime: 7 hours, 7 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 198
chunky-png 5 31 5 32 50 32 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 383 50 619 50 521
liquid-compile 5 419 5 467 50 544 50 689
liquid-render 5 167 5 168 50 436 50 354
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 177 50 252 50 207
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 157 50 247 50 248
ruby-lsp 5 138 5 147 50 240 50 245
sequel 5 424 5 441 50 602 50 604
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 163 5 162 50 183 50 187
addressable-join 5 72 5 52 50 66 50 18
addressable-merge 5 160 5 149 50 221 50 212
addressable-new 5 348 5 338 50 521 50 496
addressable-normalize 5 53 5 52 50 59 50 56
addressable-parse 5 103 5 99 50 103 50 103
addressable-setters 5 182 5 174 50 230 50 219
addressable-to-s 5 163 5 160 50 182 50 187
binarytrees 5 82 5 83 50 136 50 128
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 140 50 122 50 141
etanni 5 98 5 68 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 100
fluentd 5 56 5 61 50 20 50 30
graphql 5 358 5 442 50 571 50 922
graphql-native 5 59 5 79 50 22 50 62
knucleotide 5 162 5 163 50 117 50 118
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 51 50 95 50 91
nbody 5 247 5 251 50 676 50 702
nqueens 5 116 5 120 50 556 50 553
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 707 50 770
protoboeuf-encode 5 198 5 202 50 832 50 788
rack 5 437 5 437 50 696 50 693
ruby-json 5 84 5 98 50 50 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 47 5 48 50 156 50 149
tinygql 5 41 5 43 50 40 50 47
30k_ifelse 5 28 5 28 50 183 50 183
30k_methods 5 38 5 40 50 455 50 452
attr_accessor 5 157 5 195 50 1834 50 1917
cfunc_itself 5 348 5 349 50 1255 50 1259
fib 5 124 5 145 50 939 50 940
getivar 5 217 5 274 50 2315 50 2388
keyword_args 5 100 5 108 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 56
object-new 5 268 5 292 50 299 50 541
respond_to 5 139 5 132 50 3892 50 3906
ruby-xor 5 237 5 249 50 1314 50 1288
send_bmethod 5 116 5 121 50 5539 50 5541
send_cfunc_block 5 105 5 100 50 353 50 332
send_rubyfunc_block 5 249 5 250 50 6918 50 6926
setivar 5 360 5 355 50 4926 50 4927
setivar_object 5 341 5 322 50 751 50 570
setivar_young 5 341 5 328 50 800 50 591
str_concat 5 390 5 427 50 1199 50 1189
structaref 5 156 5 184 50 1811 50 1869
structaset 5 203 5 206 50 396 50 333
throw 5 1091 5 1220 50 1421 50 1549

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) 1550742 1315760 205 2579 0 0% 0 0 75.199583
chunky-png (click) 321439 272310 79 1373 1 0% 0 0 39.897985
erubi-rails (click) 1378075 1157938 267 3643 22 0% 0 0 100.309691
hexapdf (click) 1526801 1359883 593 15686 44 0% 0 0 457.054675
liquid-c (click) 556571 512614 114 2228 5 0% 0 0 61.849146
liquid-compile (click) 478889 406813 146 2711 2 0% 0 0 81.830889
liquid-render (click) 662433 603119 131 2946 8 0% 0 0 82.072978
lobsters (click) 8507484 7061376 3100 62169 118 0% 0 0 2214.215683
mail (click) 865542 819327 342 7700 40 0% 0 0 220.164577
psych-load (click) 289054 259041 61 832 2 0% 0 0 24.552122
railsbench (click) 3354721 2776198 1605 19594 47 0% 0 0 566.842375
rubocop (click) 5761238 5006845 3001 56850 127 0% 6 0 1818.963239
ruby-lsp (click) 959853 798951 343 6723 45 0% 1 0 188.493708
sequel (click) 503250 415588 11 119 0 0% 0 0 4.101065
shipit (click) 7491449 6265305 3265 51907 180 0% 0 0 1760.01048
addressable-equality (click) 319905 288667 44 1406 1 0% 0 0 36.074981
addressable-getters (click) 279558 230538 26 863 0 0% 0 0 21.602296
addressable-join (click) 284966 255415 24 941 0 0% 0 0 24.578208
addressable-merge (click) 284992 241584 27 896 0 0% 0 0 23.019621
addressable-new (click) 251399 221598 21 569 0 0% 0 0 14.630866
addressable-normalize (click) 314616 266436 43 1328 1 0% 0 0 33.7299
addressable-parse (click) 282270 232408 26 880 0 0% 0 0 22.505866
addressable-setters (click) 260018 216797 20 582 0 0% 0 0 14.873003
addressable-to-s (click) 279077 237626 26 849 0 0% 0 0 21.274754
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.914716
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.651329
erubi (click) 248503 207654 6 134 0 0% 0 0 4.029171
etanni (click) 32930 35718 8 114 0 0% 0 0 3.679506
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.338099
fluentd (click) 484107 442764 7 115 0 0% 0 0 3.84247
graphql (click) 410789 378618 73 1921 19 0% 0 0 55.737202
graphql-native (click) 355239 279675 39 532 0 0% 0 0 14.384265
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.799062
lee (click) 310075 263392 49 1097 0 0% 0 0 32.465579
matmul (click) 11103 4709 8 136 0 0% 0 0 4.375231
nbody (click) 14448 21176 6 251 0 0% 0 0 6.317485
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.598028
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 113.814748
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 74.766566
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 45.876315
rack (click) 281505 265982 35 580 0 0% 0 0 16.335411
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.859411
rubyboy (click) 700844 586699 154 6862 42 0% 0 0 172.011003
rubykon (click) 146441 162602 137 2076 3 0% 0 0 57.735955
sudoku (click) 52278 66593 7 878 0 0% 0 0 24.329142
tinygql (click) 301636 256384 59 1034 5 0% 0 0 27.941674
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1986.603823
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 509.620407
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.155958
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.549327
fib (click) 2659 2995 3 30 0 0% 0 0 1.179955
getivar (click) 3789 6778 3 79 0 0% 0 0 1.996874
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.89749
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.934999
object-new (click) 2406 2818 2 36 0 0% 0 0 1.17003
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.203739
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.974292
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.759146
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.42269
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.53522
setivar (click) 2783 3726 3 46 0 0% 0 0 1.342071
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.469166
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.784944
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.528584
structaref (click) 4407 9095 3 88 0 0% 0 0 2.449305
structaset (click) 3926 5614 3 70 0 0% 0 0 1.821951
throw (click) 5953 4624 5 53 0 0% 0 0 1.84678

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.