Ruby Benchmarks

Details for Benchmarks at 2025-10-30 00:40:12 UTC

YJIT metrics from the ruby-bench suite using Ruby 750c75096d.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 92.9% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 106.4% faster than CRuby 3.5.0dev
  • 4.8% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 4 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 219
chunky-png 5 31 5 33 50 32 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 388 50 626 50 585
liquid-compile 5 417 5 465 50 583 50 672
liquid-render 5 172 5 166 50 416 50 382
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 169 50 253 50 223
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 246 50 246
ruby-lsp 5 141 5 144 50 254 50 244
sequel 5 428 5 424 50 608 50 571
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 80 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 134 5 135 50 127 50 128
etanni 5 98 5 66 50 72 50 30
fannkuchredux 5 55 5 57 50 102 50 102
fluentd 5 56 5 58 50 20 50 24
graphql 5 372 5 450 50 573 50 907
graphql-native 5 57 5 83 50 22 50 63
knucleotide 5 162 5 149 50 118 50 104
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 54 50 95 50 87
nbody 5 246 5 292 50 676 50 649
nqueens 5 116 5 129 50 556 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 706 50 687
protoboeuf-encode 5 192 5 205 50 833 50 815
rack 5 442 5 440 50 718 50 680
ruby-json 5 84 5 80 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 48 50 156 50 157
tinygql 5 40 5 42 50 41 50 46
30k_ifelse 5 28 5 27 50 185 50 183
30k_methods 5 38 5 37 50 456 50 457
attr_accessor 5 157 5 197 50 1836 50 1920
cfunc_itself 5 348 5 348 50 1254 50 1258
fib 5 124 5 141 50 939 50 939
getivar 5 217 5 294 50 2316 50 2406
keyword_args 5 100 5 95 50 1239 50 1242
loops-times 5 23 5 25 50 64 50 55
object-new 5 268 5 350 50 298 50 592
respond_to 5 139 5 138 50 3889 50 3906
ruby-xor 5 236 5 246 50 1315 50 1278
send_bmethod 5 117 5 117 50 5538 50 5542
send_cfunc_block 5 106 5 105 50 353 50 338
send_rubyfunc_block 5 249 5 248 50 6923 50 6921
setivar 5 360 5 354 50 4928 50 4929
setivar_object 5 341 5 327 50 753 50 543
setivar_young 5 341 5 327 50 798 50 563
str_concat 5 397 5 400 50 1199 50 1021
throw 5 1088 5 1128 50 1416 50 1532

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) 1545559 1294437 205 2579 0 0% 0 0 73.400246
chunky-png (click) 308381 282293 74 1322 1 0% 0 0 38.163352
erubi-rails (click) 1971054 1715013 261 3697 22 0% 0 0 100.763828
hexapdf (click) 1516209 1340203 593 15674 44 0% 0 0 436.968459
liquid-c (click) 557130 496904 114 2240 5 0% 0 0 60.132869
liquid-compile (click) 477466 421471 146 2693 2 0% 0 0 78.402143
liquid-render (click) 651022 598412 131 2946 8 0% 0 0 79.282686
lobsters (click) 8451359 7037438 3099 62285 118 0% 0 0 2181.067189
mail (click) 864269 826017 342 7697 40 0% 0 0 212.486831
psych-load (click) 286458 247988 61 832 2 0% 0 0 24.107566
railsbench (click) 3357496 3034736 1605 19590 47 0% 0 0 549.664181
rubocop (click) 5759177 4981011 3001 56853 125 0% 6 0 1658.725452
ruby-lsp (click) 965790 917296 347 6784 44 0% 1 0 181.777257
sequel (click) 502588 390139 11 119 0 0% 0 0 3.838979
shipit (click) 7755033 6420002 3343 53591 181 0% 1 0 1776.660439
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.851066
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.677063
erubi (click) 249399 216543 6 134 0 0% 0 0 3.994022
etanni (click) 32930 35718 8 114 0 0% 0 0 3.612963
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.769632
fluentd (click) 482267 481854 7 115 0 0% 0 0 3.727836
graphql (click) 409832 361255 73 1921 19 0% 0 0 53.894096
graphql-native (click) 345932 310093 39 532 0 0% 0 0 13.978967
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.300001
lee (click) 318258 272364 49 1097 0 0% 0 0 31.712465
matmul (click) 11103 4709 8 136 0 0% 0 0 4.238002
nbody (click) 14448 21176 6 251 0 0% 0 0 6.129593
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.171174
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.84992
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.782061
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.492142
rack (click) 281146 257297 35 580 0 0% 0 0 15.161404
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.667239
rubyboy (click) 703275 662177 154 6862 42 0% 0 0 167.853153
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.208076
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.105545
tinygql (click) 300343 255016 59 1031 5 0% 0 0 26.931073
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1929.193552
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.095778
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.126592
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.536606
fib (click) 2659 2995 3 30 0 0% 0 0 1.111815
getivar (click) 3789 6778 3 79 0 0% 0 0 1.954983
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.783361
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.928839
object-new (click) 2406 2818 2 36 0 0% 0 0 1.054593
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.123943
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.786026
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.76016
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.29753
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.487756
setivar (click) 2783 3726 3 46 0 0% 0 0 1.311488
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.463162
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.761799
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.525477
throw (click) 5953 4624 5 53 0 0% 0 0 1.819346

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.