Ruby Benchmarks

Details for Benchmarks at 2025-10-05 01:04:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 1858233ffa.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.1% faster than CRuby 3.5.0dev
  • 6.7% faster than YJIT 3.3.6
On railsbench it is
  • 107.4% faster than CRuby 3.5.0dev
  • 7.2% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 44 minutes
aarch64 runtime: 5 hours, 49 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 85 50 167 50 221
chunky-png 5 31 5 32 50 14 50 28
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 397 50 596 50 517
liquid-compile 5 410 5 471 50 552 50 718
liquid-render 5 174 5 169 50 416 50 384
lobsters 5 20 5 20 50 10 50 10
mail 5 196 5 183 50 250 50 207
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 142 5 141 50 213 50 220
ruby-lsp 5 141 5 144 50 226 50 245
sequel 5 430 5 420 50 570 50 576
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 77 50 142 50 129
blurhash 5 82 5 86 50 127 50 145
erubi 5 125 5 139 50 100 50 136
etanni 5 90 5 65 50 53 50 32
fannkuchredux 5 52 5 57 50 97 50 102
fluentd 5 62 5 61 50 24 50 25
graphql 5 334 5 453 50 450 50 933
graphql-native 5 52 5 82 50 13 50 62
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 49 50 87 50 89
nbody 5 248 5 255 50 578 50 700
nqueens 5 120 5 127 50 74 50 549
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 171 50 621 50 679
protoboeuf-encode 5 178 5 196 50 327 50 778
rack 5 428 5 445 50 642 50 688
ruby-json 5 84 5 80 50 50 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 162 50 150
tinygql 5 40 5 42 50 39 50 47
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 37 50 480 50 471
attr_accessor 5 159 5 212 50 1725 50 1930
cfunc_itself 5 338 5 349 50 1136 50 1257
fib 5 126 5 140 50 912 50 935
getivar 5 212 5 284 50 2256 50 2393
keyword_args 5 103 5 104 50 1032 50 1241
loops-times 5 24 5 22 50 47 50 57
object-new 5 318 5 348 50 406 50 587
respond_to 5 132 5 137 50 3246 50 3900
ruby-xor 5 244 5 244 50 796 50 1263
setivar 5 360 5 379 50 3069 50 4952
setivar_object 5 357 5 356 50 684 50 555
setivar_young 5 367 5 356 50 697 50 582
str_concat 5 394 5 429 50 981 50 1144
throw 5 1264 5 1116 50 1744 50 1550

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) 1538412 1325215 205 2579 0 0% 0 0 73.028514
chunky-png (click) 317160 267089 74 1322 1 0% 0 0 37.379623
erubi-rails (click) 1929846 1634405 262 3649 22 0% 0 0 99.265622
hexapdf (click) 1510845 1349384 594 15684 43 0% 0 0 438.794986
liquid-c (click) 541403 478078 114 2228 5 0% 0 0 59.728544
liquid-compile (click) 465123 455576 146 2735 2 0% 0 0 81.558653
liquid-render (click) 647345 519314 131 2946 8 0% 0 0 80.138264
lobsters (click) 8424496 6991287 3102 62377 118 0% 0 0 2101.648366
mail (click) 856833 791401 342 7696 40 0% 0 0 213.073478
psych-load (click) 282092 274433 61 830 2 0% 0 0 24.088093
railsbench (click) 3331119 2969093 1605 19604 47 0% 0 0 549.253511
rubocop (click) 6111049 5290283 3012 63543 133 0% 6 0 1938.101801
ruby-lsp (click) 956078 849337 347 6795 44 0% 1 0 182.431919
sequel (click) 486743 434912 11 119 0 0% 0 0 3.867979
shipit (click) 7686184 6510311 3343 53281 181 0% 1 0 1758.591148
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.650882
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.676468
erubi (click) 247416 214004 5 125 0 0% 0 0 3.801729
etanni (click) 32930 35718 8 114 0 0% 0 0 3.639179
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.801313
fluentd (click) 465529 411292 7 115 0 0% 0 0 3.745756
graphql (click) 402804 359256 73 1920 19 0% 0 0 53.643132
graphql-native (click) 348667 252869 39 532 0 0% 0 0 13.916318
lee (click) 310638 295519 49 1070 0 0% 0 0 31.083221
matmul (click) 11125 4603 8 132 0 0% 0 0 4.209622
nbody (click) 13890 20235 6 238 0 0% 0 0 5.870973
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.137297
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.172487
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.278583
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.785989
rack (click) 274304 231848 35 580 0 0% 0 0 15.207616
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.633154
rubyboy (click) 689278 629001 154 6860 42 0% 0 0 167.430839
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.251204
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.176025
tinygql (click) 301304 255407 59 1037 5 0% 0 0 27.367253
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1932.14488
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 479.896001
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.166067
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.530828
fib (click) 2659 2995 3 30 0 0% 0 0 1.124084
getivar (click) 3812 6802 3 78 0 0% 0 0 1.935048
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.841811
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.7739
object-new (click) 2406 2818 2 36 0 0% 0 0 1.078185
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.134906
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.712792
setivar (click) 2783 3726 3 46 0 0% 0 0 1.279468
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.45893
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.761486
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.530201
throw (click) 5953 4624 5 53 0 0% 0 0 1.823917

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.