Ruby Benchmarks

Details for Benchmarks at 2025-10-21 01:03:19 UTC

YJIT metrics from the ruby-bench suite using Ruby 17368234bf.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.8% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 101.1% faster than CRuby 3.5.0dev
  • 1.3% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 55 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 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 82 5 85 50 188 50 217
chunky-png 5 31 5 32 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 403 50 625 50 541
liquid-compile 5 416 5 468 50 545 50 706
liquid-render 5 171 5 167 50 432 50 377
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 182 50 253 50 212
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 246 50 247
ruby-lsp 5 138 5 145 50 240 50 241
sequel 5 421 5 426 50 606 50 577
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 79 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 136 5 132 50 139 50 130
etanni 5 97 5 66 50 72 50 30
fannkuchredux 5 54 5 56 50 102 50 103
fluentd 5 56 5 56 50 29 50 29
graphql 5 371 5 450 50 578 50 906
graphql-native 5 58 5 84 50 22 50 63
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 55 50 95 50 91
nbody 5 247 5 294 50 704 50 687
nqueens 5 116 5 127 50 556 50 555
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 706 50 657
protoboeuf-encode 5 197 5 190 50 830 50 789
rack 5 438 5 437 50 712 50 679
ruby-json 5 82 5 78 50 47 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 157 50 159
tinygql 5 41 5 41 50 36 50 45
30k_ifelse 5 28 5 27 50 184 50 184
30k_methods 5 38 5 37 50 474 50 472
attr_accessor 5 157 5 193 50 1826 50 1901
cfunc_itself 5 347 5 348 50 1255 50 1258
fib 5 123 5 142 50 937 50 937
getivar 5 214 5 307 50 2311 50 2414
keyword_args 5 100 5 98 50 1240 50 1242
loops-times 5 23 5 23 50 62 50 57
object-new 5 268 5 354 50 298 50 594
respond_to 5 139 5 138 50 3888 50 3899
ruby-xor 5 237 5 249 50 1309 50 1270
send_bmethod 5 116 5 119 50 5539 50 5542
send_cfunc_block 5 107 5 104 50 360 50 351
send_rubyfunc_block 5 247 5 241 50 6924 50 6925
setivar 5 360 5 364 50 4926 50 4942
setivar_object 5 339 5 343 50 748 50 548
setivar_young 5 342 5 343 50 798 50 571
str_concat 5 388 5 415 50 1202 50 1074
throw 5 1085 5 1132 50 1404 50 1577

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) 1548152 1329843 205 2579 0 0% 0 0 78.469888
chunky-png (click) 314509 281154 74 1322 1 0% 0 0 38.280181
erubi-rails (click) 1967784 1693874 261 3691 22 0% 0 0 100.492805
hexapdf (click) 1525195 1382978 593 15678 44 0% 0 0 441.274778
liquid-c (click) 554767 477677 114 2228 5 0% 0 0 59.202489
liquid-compile (click) 478480 446608 146 2719 2 0% 0 0 80.699145
liquid-render (click) 661592 552698 131 2946 8 0% 0 0 80.759638
lobsters (click) 8441768 7057774 3100 62275 120 0% 0 0 2092.89069
mail (click) 863293 792104 342 7696 40 0% 0 0 212.779621
psych-load (click) 289648 251340 61 830 2 0% 0 0 24.352303
railsbench (click) 3348454 2949684 1605 19549 47 0% 0 0 547.461554
rubocop (click) 5758448 4980182 3001 56848 126 0% 6 0 1666.92028
ruby-lsp (click) 962593 817074 346 6753 43 0% 1 0 183.19067
sequel (click) 502521 398408 11 119 0 0% 0 0 3.838914
shipit (click) 7580295 6483848 3261 51612 180 0% 0 0 1721.91849
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.632239
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.712424
erubi (click) 246996 222389 5 125 0 0% 0 0 3.84612
etanni (click) 32930 35718 8 114 0 0% 0 0 3.605648
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.868504
fluentd (click) 490959 450764 7 115 0 0% 0 0 3.741518
graphql (click) 407621 358699 73 1920 19 0% 0 0 54.378308
graphql-native (click) 354213 311433 39 532 0 0% 0 0 13.893704
lee (click) 316496 278758 49 1070 0 0% 0 0 31.396162
matmul (click) 11125 4603 8 132 0 0% 0 0 4.193873
nbody (click) 13890 20235 6 238 0 0% 0 0 5.899223
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.241294
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.98136
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.165183
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.905142
rack (click) 280026 247827 35 580 0 0% 0 0 15.110977
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.676459
rubyboy (click) 702549 652966 154 6864 42 0% 0 0 167.99834
rubykon (click) 145449 177646 137 2062 3 0% 0 0 56.092255
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.278258
tinygql (click) 299551 253950 59 1031 5 0% 0 0 27.57536
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1938.737953
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 476.332265
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.134681
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.501499
fib (click) 2659 2995 3 30 0 0% 0 0 1.129722
getivar (click) 3812 6802 3 78 0 0% 0 0 1.950422
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.809622
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.838292
object-new (click) 2406 2818 2 36 0 0% 0 0 1.054882
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.116414
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.679952
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.765796
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.320107
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.475153
setivar (click) 2783 3726 3 46 0 0% 0 0 1.260665
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.466132
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.746349
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.494331
throw (click) 5953 4624 5 53 0 0% 0 0 1.841825

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.