Ruby Benchmarks

Details for Benchmarks at 2025-10-12 01:03:04 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.3% faster than CRuby 3.5.0dev
  • 1.2% faster than YJIT 3.4.7
On railsbench it is
  • 97.0% faster than CRuby 3.5.0dev
  • 1.9% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 44 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.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 83 5 86 50 191 50 228
chunky-png 5 31 5 32 50 33 50 27
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 388 50 631 50 507
liquid-compile 5 407 5 469 50 547 50 704
liquid-render 5 171 5 168 50 414 50 367
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 182 50 253 50 225
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 245 50 245
ruby-lsp 5 142 5 146 50 224 50 245
sequel 5 420 5 416 50 582 50 575
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 79 50 136 50 128
blurhash 5 83 5 88 50 143 50 144
erubi 5 135 5 136 50 134 50 131
etanni 5 97 5 67 50 71 50 30
fannkuchredux 5 55 5 57 50 101 50 99
fluentd 5 56 5 56 50 29 50 26
graphql 5 371 5 450 50 569 50 899
graphql-native 5 58 5 84 50 20 50 60
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 90
nbody 5 247 5 294 50 704 50 695
nqueens 5 116 5 125 50 556 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 706 50 670
protoboeuf-encode 5 197 5 202 50 824 50 777
rack 5 441 5 439 50 710 50 679
ruby-json 5 82 5 79 50 47 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 156 50 155
tinygql 5 41 5 42 50 40 50 46
30k_ifelse 5 28 5 27 50 185 50 184
30k_methods 5 39 5 37 50 473 50 473
attr_accessor 5 158 5 191 50 1821 50 1892
cfunc_itself 5 348 5 356 50 1254 50 1258
fib 5 123 5 141 50 937 50 937
getivar 5 215 5 283 50 2316 50 2395
keyword_args 5 100 5 105 50 1239 50 1240
loops-times 5 23 5 23 50 62 50 57
object-new 5 268 5 345 50 296 50 562
respond_to 5 139 5 137 50 3889 50 3897
ruby-xor 5 236 5 238 50 1309 50 1273
setivar 5 359 5 354 50 4928 50 4931
setivar_object 5 339 5 344 50 751 50 578
setivar_young 5 341 5 344 50 798 50 618
str_concat 5 391 5 403 50 1199 50 1075
throw 5 1088 5 1085 50 1416 50 1535

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) 1546379 1270575 205 2579 0 0% 0 0 73.510771
chunky-png (click) 317835 309021 74 1322 1 0% 0 0 37.407894
erubi-rails (click) 1972773 1766425 262 3675 22 0% 0 0 99.840627
hexapdf (click) 1527916 1336307 593 15680 44 0% 0 0 441.155127
liquid-c (click) 556884 455309 114 2224 5 0% 0 0 59.788081
liquid-compile (click) 479589 423273 146 2709 2 0% 0 0 80.729243
liquid-render (click) 662508 586061 131 2946 8 0% 0 0 80.545496
lobsters (click) 8455827 6915804 3099 62321 118 0% 0 0 2192.595068
mail (click) 865194 818565 342 7696 40 0% 0 0 213.652143
psych-load (click) 291202 260890 61 830 2 0% 0 0 24.37234
railsbench (click) 3366361 3017398 1605 19641 47 0% 0 0 552.851716
rubocop (click) 5758880 5013283 3001 56842 126 0% 6 0 1681.897447
ruby-lsp (click) 964019 834618 347 6795 44 0% 1 0 183.047287
sequel (click) 503707 464831 11 119 0 0% 0 0 3.890894
shipit (click) 7727674 6478639 3344 53331 181 0% 1 0 1785.26627
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.690085
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.801577
erubi (click) 248176 231431 5 125 0 0% 0 0 3.802299
etanni (click) 32930 35718 8 114 0 0% 0 0 3.654924
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.891913
fluentd (click) 491825 467324 7 115 0 0% 0 0 3.73447
graphql (click) 410947 362048 73 1920 19 0% 0 0 54.541552
graphql-native (click) 355391 320475 39 532 0 0% 0 0 14.172658
lee (click) 319844 314863 49 1070 0 0% 0 0 31.459733
matmul (click) 11125 4603 8 132 0 0% 0 0 4.248075
nbody (click) 13890 20235 6 238 0 0% 0 0 5.857909
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.240585
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.434207
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 73.443019
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.672203
rack (click) 283374 267512 35 580 0 0% 0 0 15.353031
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.613218
rubyboy (click) 704592 646956 154 6860 42 0% 0 0 168.494016
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.452914
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.320884
tinygql (click) 301406 272210 59 1031 5 0% 0 0 27.529932
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1942.326848
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.657231
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.123529
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.51905
fib (click) 2659 2995 3 30 0 0% 0 0 1.127651
getivar (click) 3812 6802 3 78 0 0% 0 0 1.949471
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.848471
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.818599
object-new (click) 2406 2818 2 36 0 0% 0 0 1.093927
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.118831
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.695998
setivar (click) 2783 3726 3 46 0 0% 0 0 1.285031
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.45127
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.713433
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.49381
throw (click) 5953 4624 5 53 0 0% 0 0 1.786912

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.