Ruby Benchmarks

Details for Benchmarks at 2025-11-12 00:40:20 UTC

YJIT metrics from the ruby-bench suite using Ruby 9fb61765f4.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 92.4% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 102.0% faster than CRuby 4.0.0dev
  • 3.3% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 25 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 195 50 227
chunky-png 5 31 5 32 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 421 5 396 50 628 50 538
liquid-compile 5 406 5 463 50 581 50 709
liquid-render 5 172 5 165 50 414 50 393
lobsters 5 19 5 20 50 10 50 10
mail 5 194 5 170 50 253 50 193
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 246 50 246
ruby-lsp 5 142 5 145 50 245 50 240
sequel 5 421 5 412 50 591 50 592
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 88 50 143 50 145
erubi 5 135 5 140 50 132 50 142
etanni 5 98 5 64 50 71 50 33
fannkuchredux 5 55 5 56 50 102 50 97
fluentd 5 56 5 63 50 20 50 23
graphql 5 373 5 454 50 573 50 917
graphql-native 5 59 5 82 50 22 50 63
knucleotide 5 163 5 152 50 118 50 107
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 53 50 95 50 91
nbody 5 245 5 290 50 676 50 663
nqueens 5 116 5 125 50 556 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 180 50 706 50 649
protoboeuf-encode 5 198 5 208 50 836 50 796
rack 5 427 5 444 50 708 50 689
ruby-json 5 84 5 96 50 47 50 63
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 147
tinygql 5 42 5 43 50 36 50 47
30k_ifelse 5 28 5 28 50 184 50 148
30k_methods 5 38 5 40 50 455 50 457
attr_accessor 5 157 5 192 50 1833 50 1910
cfunc_itself 5 333 5 347 50 1255 50 1259
fib 5 124 5 133 50 939 50 940
getivar 5 217 5 294 50 2315 50 2407
keyword_args 5 100 5 105 50 1240 50 1242
loops-times 5 23 5 25 50 64 50 57
object-new 5 268 5 350 50 298 50 563
respond_to 5 139 5 131 50 3892 50 3904
ruby-xor 5 237 5 249 50 1314 50 1284
send_bmethod 5 116 5 125 50 5539 50 5540
send_cfunc_block 5 106 5 99 50 353 50 330
send_rubyfunc_block 5 251 5 254 50 6922 50 6919
setivar 5 360 5 382 50 4925 50 4962
setivar_object 5 341 5 359 50 754 50 584
setivar_young 5 341 5 359 50 796 50 622
str_concat 5 390 5 398 50 1199 50 1165
structaref 5 154 5 200 50 1810 50 1842
throw 5 1091 5 1205 50 1419 50 1537

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) 1550575 1307719 205 2579 0 0% 0 0 73.472338
chunky-png (click) 317323 243425 74 1322 1 0% 0 0 37.404649
erubi-rails (click) 1375014 1162062 267 3651 22 0% 0 0 97.199916
hexapdf (click) 1524930 1366668 593 15682 44 0% 0 0 443.942394
liquid-c (click) 556542 480054 114 2228 5 0% 0 0 59.213493
liquid-compile (click) 478841 463942 146 2705 2 0% 0 0 78.503543
liquid-render (click) 663859 612871 131 2946 8 0% 0 0 79.587816
lobsters (click) 8524431 7149892 3102 62442 118 0% 0 0 2181.370876
mail (click) 864648 777484 342 7696 40 0% 0 0 212.957599
psych-load (click) 288912 275351 61 832 2 0% 0 0 23.648213
railsbench (click) 3358879 2814907 1605 19589 47 0% 0 0 552.220889
rubocop (click) 5760786 4917048 3001 56851 125 0% 6 0 1681.31907
ruby-lsp (click) 963473 859342 347 6784 44 0% 1 0 183.419816
sequel (click) 503244 448512 11 119 0 0% 0 0 3.814868
shipit (click) 7621563 6441966 3345 53384 181 0% 1 0 1757.930553
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.853007
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.726077
erubi (click) 248224 182804 6 134 0 0% 0 0 4.027222
etanni (click) 32930 35718 8 114 0 0% 0 0 3.659313
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.84451
fluentd (click) 491946 443613 7 115 0 0% 0 0 3.716701
graphql (click) 407324 350613 73 1921 19 0% 0 0 54.187732
graphql-native (click) 354838 287658 39 532 0 0% 0 0 13.971567
knucleotide (click) 9997 11103 7 113 0 0% 0 0 8.883475
lee (click) 318525 289270 49 1097 0 0% 0 0 31.621688
matmul (click) 11103 4709 8 136 0 0% 0 0 4.269623
nbody (click) 14448 21176 6 251 0 0% 0 0 6.141565
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.197891
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.202706
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.789535
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.590053
rack (click) 281363 233214 35 580 0 0% 0 0 14.869831
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.666022
rubyboy (click) 700888 659977 154 6864 42 0% 0 0 167.540522
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.392907
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.144848
tinygql (click) 299604 287397 59 1025 5 0% 0 0 26.802783
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1922.552881
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.433887
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.120985
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.537725
fib (click) 2659 2995 3 30 0 0% 0 0 1.169561
getivar (click) 3789 6778 3 79 0 0% 0 0 1.964718
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.839388
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.89755
object-new (click) 2406 2818 2 36 0 0% 0 0 1.13523
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.143675
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.836097
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.759286
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.339611
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.510201
setivar (click) 2783 3726 3 46 0 0% 0 0 1.298294
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.475711
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.766264
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.509678
structaref (click) 4407 9095 3 88 0 0% 0 0 2.352049
throw (click) 5953 4624 5 53 0 0% 0 0 1.78896

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.