Ruby Benchmarks

Details for Benchmarks at 2025-09-27 01:03:54 UTC

YJIT metrics from the ruby-bench suite using Ruby 598a8f8914.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.6% faster than CRuby 3.5.0dev
  • 5.6% faster than YJIT 3.3.6
On railsbench it is
  • 99.7% faster than CRuby 3.5.0dev
  • 6.8% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 45 minutes
aarch64 runtime: 5 hours, 51 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 84 5 86 50 183 50 223
chunky-png 5 31 5 32 50 14 50 28
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 411 5 388 50 600 50 551
liquid-compile 5 406 5 469 50 547 50 681
liquid-render 5 169 5 166 50 409 50 371
lobsters 5 20 5 20 50 10 50 10
mail 5 191 5 176 50 238 50 208
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 139 5 140 50 214 50 219
ruby-lsp 5 146 5 145 50 229 50 246
sequel 5 431 5 420 50 580 50 580
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 81 50 142 50 129
blurhash 5 82 5 87 50 127 50 145
erubi 5 117 5 137 50 99 50 137
etanni 5 90 5 67 50 54 50 32
fannkuchredux 5 52 5 57 50 98 50 102
fluentd 5 62 5 62 50 23 50 28
graphql 5 336 5 444 50 455 50 944
graphql-native 5 52 5 81 50 13 50 63
lee 5 22 5 22 50 10 50 10
matmul 5 50 5 50 50 87 50 91
nbody 5 248 5 245 50 578 50 703
nqueens 5 120 5 128 50 74 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 173 50 621 50 654
protoboeuf-encode 5 179 5 206 50 326 50 781
rack 5 429 5 447 50 640 50 695
ruby-json 5 83 5 79 50 49 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 51 50 162 50 152
tinygql 5 40 5 42 50 40 50 48
30k_ifelse 5 28 5 27 50 214 50 184
30k_methods 5 39 5 37 50 478 50 472
attr_accessor 5 159 5 204 50 1725 50 1920
cfunc_itself 5 337 5 372 50 1137 50 1258
fib 5 126 5 135 50 911 50 937
getivar 5 209 5 344 50 2259 50 2444
keyword_args 5 103 5 100 50 1034 50 1243
loops-times 5 24 5 24 50 48 50 57
object-new 5 318 5 345 50 405 50 586
respond_to 5 133 5 134 50 3254 50 3898
ruby-xor 5 243 5 251 50 796 50 1274
setivar 5 361 5 395 50 3108 50 4976
setivar_object 5 358 5 367 50 684 50 587
setivar_young 5 367 5 367 50 697 50 615
str_concat 5 393 5 437 50 979 50 1083
throw 5 1265 5 1183 50 1743 50 1610

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) 1538540 1300680 205 2577 0 0% 0 0 73.478482
chunky-png (click) 316867 291329 74 1322 1 0% 0 0 37.690503
erubi-rails (click) 1938645 1707386 261 3682 22 0% 0 0 100.478514
hexapdf (click) 1513682 1335652 593 15680 43 0% 0 0 438.908024
liquid-c (click) 541073 428559 114 2228 5 0% 0 0 59.599924
liquid-compile (click) 452065 408538 146 2698 2 0% 0 0 78.568356
liquid-render (click) 647571 568741 131 2946 8 0% 0 0 80.771302
lobsters (click) 8544109 7139908 3120 63548 118 0% 0 0 2097.782888
mail (click) 856833 791401 342 7696 40 0% 0 0 213.552216
psych-load (click) 282087 241645 61 830 2 0% 0 0 24.363849
railsbench (click) 3339083 2870476 1605 19680 47 0% 0 0 553.761828
rubocop (click) 6124540 5329321 3014 63674 156 0% 6 0 1827.876649
ruby-lsp (click) 961505 879558 347 6802 44 0% 1 0 183.722571
sequel (click) 486748 434883 11 119 0 0% 0 0 3.97136
shipit (click) 7605902 6387258 3264 52119 182 0% 0 0 1692.008102
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.612999
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.676804
erubi (click) 247501 197658 5 125 0 0% 0 0 3.826156
etanni (click) 32930 35718 8 114 0 0% 0 0 3.591493
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.791895
fluentd (click) 467305 396459 7 115 0 0% 0 0 3.734925
graphql (click) 405283 336320 73 1920 19 0% 0 0 54.077125
graphql-native (click) 346737 285070 39 532 0 0% 0 0 14.018663
lee (click) 310629 287322 49 1070 0 0% 0 0 31.130541
matmul (click) 11125 4603 8 132 0 0% 0 0 4.195822
nbody (click) 13890 20235 6 238 0 0% 0 0 5.878663
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.149335
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.129086
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.134541
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.227434
rack (click) 274304 215435 35 580 0 0% 0 0 14.98497
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.610626
rubyboy (click) 689685 629362 154 6860 42 0% 0 0 168.152371
rubykon (click) 146229 162118 137 2070 3 0% 0 0 57.096978
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.177705
tinygql (click) 302163 272740 59 1031 5 0% 0 0 27.165037
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1926.638065
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.444378
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.138013
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.517899
fib (click) 2659 2995 3 30 0 0% 0 0 1.140268
getivar (click) 3812 6802 3 78 0 0% 0 0 1.956208
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.827309
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.762912
object-new (click) 2406 2818 2 36 0 0% 0 0 1.096422
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.132471
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.682014
setivar (click) 2783 3726 3 46 0 0% 0 0 1.279692
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.470902
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.718086
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.455859
throw (click) 5953 4624 5 53 0 0% 0 0 1.862641

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.