Ruby Benchmarks

Details for Benchmarks at 2025-09-14 03:47:12 UTC

YJIT metrics from the ruby-bench suite using Ruby 5e90d9e2aa.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.6% faster than CRuby 3.5.0dev
  • 6.5% faster than YJIT 3.3.6
On railsbench it is
  • 107.9% faster than CRuby 3.5.0dev
  • 7.2% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 28 minutes
aarch64 runtime: 3 hours, 48 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 83 5 86 50 185 50 219
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 421 5 390 50 599 50 551
liquid-compile 5 410 5 463 50 548 50 678
liquid-render 5 171 5 169 50 416 50 377
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 172 50 249 50 222
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 138 5 141 50 203 50 220
ruby-lsp 5 141 5 147 50 225 50 243
sequel 5 431 5 434 50 595 50 599
shipit 5 10 5 10 50 10 50 10
binarytrees 5 77 5 83 50 146 50 128
blurhash 5 82 5 88 50 127 50 145
erubi 5 126 5 138 50 101 50 137
etanni 5 90 5 69 50 53 50 34
fannkuchredux 5 52 5 57 50 97 50 92
fluentd 5 62 5 64 50 25 50 31
graphql 5 336 5 455 50 449 50 911
graphql-native 5 51 5 79 50 14 50 62
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 54 50 88 50 89
nbody 5 249 5 267 50 585 50 699
nqueens 5 120 5 129 50 74 50 539
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 186 50 621 50 745
protoboeuf-encode 5 179 5 193 50 328 50 768
rack 5 419 5 440 50 603 50 710
ruby-json 5 83 5 84 50 50 50 52
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 52 50 163 50 139
tinygql 5 41 5 43 50 41 50 48
30k_ifelse 5 28 5 28 50 216 50 185
30k_methods 5 39 5 39 50 481 50 474
attr_accessor 5 157 5 197 50 1721 50 1903
cfunc_itself 5 357 5 360 50 1137 50 1258
fib 5 127 5 101 50 902 50 931
getivar 5 212 5 316 50 2253 50 2404
keyword_args 5 104 5 105 50 1034 50 1243
loops-times 5 24 5 25 50 48 50 57
object-new 5 318 5 314 50 405 50 483
respond_to 5 134 5 137 50 3256 50 3900
ruby-xor 5 243 5 239 50 799 50 1277
setivar 5 361 5 379 50 3186 50 4956
setivar_object 5 353 5 328 50 670 50 587
setivar_young 5 367 5 331 50 704 50 605
str_concat 5 396 5 452 50 982 50 1118
throw 5 1273 5 1122 50 1729 50 1409

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) 1537103 1372739 203 2570 0 0% 0 0 74.68394
chunky-png (click) 317531 308317 74 1322 1 0% 0 0 38.839669
erubi-rails (click) 1936255 1614712 262 3691 22 0% 0 0 102.166756
hexapdf (click) 1513901 1409319 593 15676 43 0% 0 0 453.382406
liquid-c (click) 542332 479051 114 2243 5 0% 0 0 63.092751
liquid-compile (click) 465839 439841 146 2734 2 0% 0 0 81.383275
liquid-render (click) 647815 536062 131 2946 8 0% 0 0 81.699727
lobsters (click) 8552380 7264320 3118 63616 118 0% 0 0 2201.69834
mail (click) 856534 799505 342 7696 40 0% 0 0 214.998433
psych-load (click) 281332 232176 61 830 2 0% 0 0 24.159275
railsbench (click) 3328860 2984349 1605 19568 47 0% 0 0 553.42267
rubocop (click) 6121204 5408439 3014 63653 157 0% 6 0 1842.016865
ruby-lsp (click) 961035 830435 347 6795 44 0% 1 0 187.804979
sequel (click) 495245 404954 11 119 0 0% 0 0 3.997512
shipit (click) 7655805 6442215 3287 52682 184 0% 0 0 1727.277444
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.603262
blurhash (click) 52295 51444 27 603 0 0% 0 0 18.046982
erubi (click) 247875 214290 5 125 0 0% 0 0 3.804277
etanni (click) 32930 35718 8 114 0 0% 0 0 3.595864
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.165916
fluentd (click) 466495 404095 7 115 0 0% 0 0 3.756189
graphql (click) 402302 351279 73 1920 19 0% 0 0 54.585074
graphql-native (click) 346042 292441 39 532 0 0% 0 0 14.178633
lee (click) 310958 271240 49 1070 0 0% 0 0 31.506427
matmul (click) 11125 4603 8 132 0 0% 0 0 4.177362
nbody (click) 13890 20235 6 238 0 0% 0 0 5.857211
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.374455
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.421522
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 76.075459
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 46.654287
rack (click) 276509 249012 35 580 0 0% 0 0 15.448835
ruby-json (click) 19776 17761 8 204 0 0% 0 0 5.660666
rubyboy (click) 688417 635802 154 6858 42 0% 0 0 173.318127
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.542594
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.679528
tinygql (click) 301100 246910 59 1031 5 0% 0 0 27.441565
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1950.279642
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 481.760074
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.06709
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.462143
fib (click) 2659 2995 3 30 0 0% 0 0 1.074271
getivar (click) 3812 6802 3 78 0 0% 0 0 1.908739
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.76074
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.701809
object-new (click) 2406 2818 2 36 0 0% 0 0 1.076774
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.08398
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.715822
setivar (click) 2783 3726 3 46 0 0% 0 0 1.243866
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.389081
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.697688
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.383394
throw (click) 5953 4624 5 53 0 0% 0 0 1.781012

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.