Ruby Benchmarks

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

YJIT metrics from the ruby-bench suite using Ruby 77331b99c6.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 96.8% faster than CRuby 3.5.0dev
  • 6.9% faster than YJIT 3.3.6
On railsbench it is
  • 103.4% faster than CRuby 3.5.0dev
  • 4.3% 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 82 5 84 50 166 50 222
chunky-png 5 31 5 31 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 419 5 382 50 573 50 594
liquid-compile 5 412 5 465 50 547 50 716
liquid-render 5 173 5 165 50 416 50 382
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 170 50 251 50 223
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 139 5 141 50 208 50 219
ruby-lsp 5 144 5 143 50 233 50 242
sequel 5 422 5 420 50 599 50 573
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 77 50 141 50 129
blurhash 5 82 5 87 50 127 50 145
erubi 5 115 5 138 50 89 50 137
etanni 5 90 5 64 50 53 50 33
fannkuchredux 5 52 5 57 50 97 50 102
fluentd 5 62 5 61 50 23 50 30
graphql 5 350 5 456 50 443 50 941
graphql-native 5 51 5 81 50 13 50 61
lee 5 23 5 22 50 10 50 10
matmul 5 50 5 49 50 87 50 89
nbody 5 249 5 253 50 578 50 699
nqueens 5 120 5 127 50 74 50 551
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 178 50 621 50 664
protoboeuf-encode 5 178 5 197 50 326 50 777
rack 5 416 5 445 50 646 50 696
ruby-json 5 83 5 80 50 50 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 50 50 162 50 150
tinygql 5 40 5 42 50 40 50 47
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 37 50 481 50 470
attr_accessor 5 159 5 207 50 1727 50 1921
cfunc_itself 5 338 5 347 50 1137 50 1258
fib 5 127 5 139 50 911 50 937
getivar 5 211 5 288 50 2252 50 2394
keyword_args 5 103 5 105 50 1033 50 1241
loops-times 5 24 5 22 50 48 50 57
object-new 5 317 5 347 50 405 50 587
respond_to 5 133 5 135 50 3254 50 3900
ruby-xor 5 244 5 248 50 796 50 1262
setivar 5 361 5 370 50 3047 50 4948
setivar_object 5 357 5 356 50 683 50 555
setivar_young 5 367 5 356 50 698 50 580
str_concat 5 390 5 428 50 976 50 1149
throw 5 1264 5 1150 50 1748 50 1572

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 1341531 205 2579 0 0% 0 0 72.975912
chunky-png (click) 317160 267089 74 1322 1 0% 0 0 37.44845
erubi-rails (click) 1933607 1712147 262 3680 22 0% 0 0 99.724018
hexapdf (click) 1514125 1385118 594 15689 43 0% 0 0 445.896758
liquid-c (click) 529855 506606 114 2228 5 0% 0 0 60.43294
liquid-compile (click) 465406 373636 146 2709 2 0% 0 0 79.801915
liquid-render (click) 647345 519314 131 2946 8 0% 0 0 80.512536
lobsters (click) 8399688 7068286 3098 62135 120 0% 0 0 2192.050094
mail (click) 856540 848397 342 7696 40 0% 0 0 213.326424
psych-load (click) 282087 241645 61 830 2 0% 0 0 24.407219
railsbench (click) 3324649 2854825 1605 19551 47 0% 0 0 554.923891
rubocop (click) 6109971 5322961 3012 63577 134 0% 6 0 1848.566348
ruby-lsp (click) 955692 832400 346 6769 43 0% 1 0 181.887449
sequel (click) 494880 429282 11 119 0 0% 0 0 3.835486
shipit (click) 7905997 6480223 3399 55388 186 0% 1 0 1909.71435
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.605076
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.658257
erubi (click) 247501 197658 5 125 0 0% 0 0 3.807935
etanni (click) 32930 35718 8 114 0 0% 0 0 3.646905
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.935858
fluentd (click) 467305 396560 7 115 0 0% 0 0 3.718743
graphql (click) 402307 334877 73 1920 19 0% 0 0 54.032616
graphql-native (click) 346737 285070 39 532 0 0% 0 0 13.96659
lee (click) 310638 287327 49 1070 0 0% 0 0 31.451021
matmul (click) 11125 4603 8 132 0 0% 0 0 4.246627
nbody (click) 13890 20235 6 238 0 0% 0 0 5.865451
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.190133
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.619435
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.992084
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.717786
rack (click) 274304 215435 35 580 0 0% 0 0 15.358994
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.639291
rubyboy (click) 689193 628943 154 6860 42 0% 0 0 168.214723
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.531735
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.333893
tinygql (click) 300598 246575 59 1031 5 0% 0 0 27.077009
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1926.130915
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 476.136392
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.137073
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.526495
fib (click) 2659 2995 3 30 0 0% 0 0 1.145429
getivar (click) 3812 6802 3 78 0 0% 0 0 1.962917
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.8319
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.81196
object-new (click) 2406 2818 2 36 0 0% 0 0 1.09534
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.140774
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.723863
setivar (click) 2783 3726 3 46 0 0% 0 0 1.299708
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.442812
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.744182
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.512981
throw (click) 5953 4624 5 53 0 0% 0 0 1.830741

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.