Ruby Benchmarks

Details for Benchmarks at 2025-11-04 00:38:57 UTC

YJIT metrics from the ruby-bench suite using Ruby 2c2eaa3103.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 86.4% faster than CRuby 3.5.0dev
  • 3.2% slower than YJIT 3.4.7
On railsbench it is
  • 101.1% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
x86_64 runtime: 7 hours, 9 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 84 5 86 50 191 50 220
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 390 50 625 50 489
liquid-compile 5 417 5 471 50 585 50 716
liquid-render 5 171 5 164 50 435 50 386
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 177 50 253 50 151
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 156 50 248 50 248
ruby-lsp 5 139 5 145 50 229 50 243
sequel 5 427 5 415 50 601 50 571
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 125
blurhash 5 83 5 88 50 143 50 144
erubi 5 134 5 132 50 126 50 125
etanni 5 98 5 65 50 71 50 28
fannkuchredux 5 55 5 57 50 102 50 98
fluentd 5 57 5 58 50 20 50 23
graphql 5 372 5 454 50 566 50 904
graphql-native 5 58 5 81 50 22 50 64
knucleotide 5 162 5 154 50 117 50 109
lee 5 23 5 21 50 10 50 10
matmul 5 51 5 53 50 95 50 90
nbody 5 246 5 292 50 676 50 695
nqueens 5 116 5 129 50 557 50 561
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 177 50 707 50 642
protoboeuf-encode 5 197 5 203 50 833 50 781
rack 5 441 5 439 50 708 50 673
ruby-json 5 84 5 93 50 47 50 65
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 20 50 10 50 10
sudoku 5 48 5 48 50 156 50 146
tinygql 5 42 5 42 50 40 50 47
30k_ifelse 5 28 5 27 50 184 50 183
30k_methods 5 38 5 37 50 455 50 455
attr_accessor 5 157 5 199 50 1835 50 1925
cfunc_itself 5 348 5 348 50 1254 50 1258
fib 5 124 5 141 50 939 50 939
getivar 5 215 5 293 50 2314 50 2394
keyword_args 5 99 5 101 50 1239 50 1242
loops-times 5 23 5 24 50 64 50 56
object-new 5 268 5 349 50 298 50 581
respond_to 5 139 5 137 50 3890 50 3896
ruby-xor 5 237 5 251 50 1314 50 1263
send_bmethod 5 116 5 119 50 5538 50 5543
send_cfunc_block 5 106 5 100 50 353 50 332
send_rubyfunc_block 5 252 5 246 50 6869 50 6924
setivar 5 360 5 359 50 4927 50 4937
setivar_object 5 341 5 346 50 751 50 576
setivar_young 5 341 5 346 50 796 50 610
str_concat 5 390 5 412 50 1199 50 996
structaref 5 156 5 179 50 1808 50 1858
throw 5 1086 5 1108 50 1416 50 1544

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) 1548610 1338909 205 2579 0 0% 0 0 73.107284
chunky-png (click) 317011 308410 74 1322 1 0% 0 0 37.891507
erubi-rails (click) 1968213 1688217 262 3661 22 0% 0 0 99.165505
hexapdf (click) 1527341 1368793 593 15700 44 0% 0 0 443.12142
liquid-c (click) 555792 495374 114 2228 5 0% 0 0 60.668837
liquid-compile (click) 469980 413040 146 2752 2 0% 0 0 80.950764
liquid-render (click) 662150 627206 131 2946 8 0% 0 0 80.551221
lobsters (click) 8454321 7186157 3101 62379 118 0% 0 0 2101.715958
mail (click) 864320 777009 342 7696 40 0% 0 0 214.178449
psych-load (click) 280225 265238 61 832 2 0% 0 0 24.038103
railsbench (click) 3363937 2984601 1605 19668 47 0% 0 0 550.527052
rubocop (click) 5761102 5080680 3001 56854 126 0% 6 0 1669.74186
ruby-lsp (click) 963111 899445 347 6782 44 0% 1 0 182.29786
sequel (click) 500728 478240 11 119 0 0% 0 0 3.783881
shipit (click) 7810258 6701586 3398 55300 186 0% 1 0 1820.68857
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.853843
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.90233
erubi (click) 250195 215923 6 134 0 0% 0 0 3.933562
etanni (click) 32930 35718 8 114 0 0% 0 0 3.635607
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.838134
fluentd (click) 489640 416339 7 115 0 0% 0 0 3.73227
graphql (click) 410111 353291 73 1921 19 0% 0 0 53.972642
graphql-native (click) 354597 303416 39 532 0 0% 0 0 13.844504
knucleotide (click) 9997 11103 7 113 0 0% 0 0 9.218532
lee (click) 318258 272364 49 1097 0 0% 0 0 31.468515
matmul (click) 11103 4709 8 136 0 0% 0 0 4.237225
nbody (click) 14448 21176 6 251 0 0% 0 0 6.216573
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.200236
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.281042
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 73.20867
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.660434
rack (click) 281146 290114 35 580 0 0% 0 0 15.2097
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.651828
rubyboy (click) 703275 662177 154 6862 42 0% 0 0 167.189932
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.528305
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.331771
tinygql (click) 298070 277086 59 1031 5 0% 0 0 27.077283
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1936.54409
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.297718
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.147362
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.478133
fib (click) 2659 2995 3 30 0 0% 0 0 1.15988
getivar (click) 3789 6778 3 79 0 0% 0 0 1.967423
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.838695
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.946212
object-new (click) 2406 2818 2 36 0 0% 0 0 1.116622
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.188869
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.833635
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.747483
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.309227
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.494663
setivar (click) 2783 3726 3 46 0 0% 0 0 1.29383
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.462576
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.733567
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.493616
structaref (click) 4407 9095 3 88 0 0% 0 0 2.345084
throw (click) 5953 4624 5 53 0 0% 0 0 1.8279

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.