Ruby Benchmarks

Details for Benchmarks at 2025-11-15 00:38:59 UTC

YJIT metrics from the ruby-bench suite using Ruby d7369f027b.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 89.1% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 97.5% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
x86_64 runtime: 7 hours, 28 minutes
aarch64 runtime: 6 hours, 23 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 4.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 83 5 87 50 192 50 226
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 391 50 623 50 552
liquid-compile 5 417 5 462 50 544 50 684
liquid-render 5 168 5 163 50 414 50 328
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 178 50 253 50 201
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 246 50 250
ruby-lsp 5 143 5 145 50 233 50 242
sequel 5 423 5 432 50 592 50 593
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 83 50 139 50 127
blurhash 5 83 5 81 50 143 50 145
erubi 5 137 5 142 50 135 50 139
etanni 5 99 5 69 50 72 50 35
fannkuchredux 5 55 5 56 50 100 50 99
fluentd 5 56 5 65 50 20 50 32
graphql 5 375 5 460 50 575 50 913
graphql-native 5 59 5 79 50 22 50 62
knucleotide 5 163 5 159 50 117 50 113
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 51 50 94 50 90
nbody 5 246 5 272 50 677 50 665
nqueens 5 116 5 125 50 556 50 568
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 180 50 706 50 741
protoboeuf-encode 5 197 5 209 50 832 50 794
rack 5 437 5 437 50 709 50 689
ruby-json 5 84 5 100 50 50 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 156
tinygql 5 40 5 44 50 40 50 47
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 40 50 455 50 455
attr_accessor 5 157 5 201 50 1835 50 1922
cfunc_itself 5 348 5 344 50 1254 50 1259
fib 5 124 5 141 50 939 50 930
getivar 5 217 5 303 50 2316 50 2416
keyword_args 5 100 5 108 50 1239 50 1242
loops-times 5 23 5 24 50 64 50 56
object-new 5 269 5 308 50 297 50 456
respond_to 5 139 5 135 50 3891 50 3904
ruby-xor 5 236 5 253 50 1314 50 1289
send_bmethod 5 116 5 125 50 5538 50 5537
send_cfunc_block 5 106 5 106 50 352 50 339
send_rubyfunc_block 5 251 5 246 50 6924 50 6918
setivar 5 360 5 364 50 4926 50 4942
setivar_object 5 338 5 317 50 750 50 599
setivar_young 5 341 5 322 50 798 50 631
str_concat 5 390 5 399 50 1199 50 1173
structaref 5 156 5 199 50 1810 50 1890
throw 5 1089 5 1149 50 1421 50 1398

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) 1550619 1315965 205 2579 0 0% 0 0 72.91805
chunky-png (click) 312964 273002 74 1330 1 0% 0 0 37.754965
erubi-rails (click) 1375929 1171465 267 3644 22 0% 0 0 97.120262
hexapdf (click) 1526316 1359783 593 15684 44 0% 0 0 435.266232
liquid-c (click) 555028 495197 114 2228 5 0% 0 0 60.427657
liquid-compile (click) 477160 429801 146 2698 2 0% 0 0 77.832233
liquid-render (click) 661667 594614 131 2946 8 0% 0 0 79.260502
lobsters (click) 8529288 7281384 3101 62442 118 0% 0 0 2096.288418
mail (click) 863873 760653 342 7700 40 0% 0 0 213.672958
psych-load (click) 288952 242636 61 832 2 0% 0 0 23.816091
railsbench (click) 3354016 2875007 1605 19557 47 0% 0 0 549.109022
rubocop (click) 5762741 4910542 3001 56853 125 0% 6 0 1655.404789
ruby-lsp (click) 963026 892099 347 6777 44 0% 1 0 182.341792
sequel (click) 503149 464886 11 119 0 0% 0 0 4.007923
shipit (click) 7476605 6299525 3265 51704 180 0% 0 0 1698.351861
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.826909
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.882248
erubi (click) 248180 182819 6 134 0 0% 0 0 3.938856
etanni (click) 32930 35718 8 114 0 0% 0 0 3.581195
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.92778
fluentd (click) 490981 426166 7 115 0 0% 0 0 3.698432
graphql (click) 408818 352564 73 1921 19 0% 0 0 54.137585
graphql-native (click) 354794 312229 39 532 0 0% 0 0 13.691656
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.778245
lee (click) 316924 279809 49 1097 0 0% 0 0 31.446769
matmul (click) 11103 4709 8 136 0 0% 0 0 4.182236
nbody (click) 14448 21176 6 251 0 0% 0 0 6.096504
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.307362
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.947598
protoboeuf (click) 170129 251445 12 2837 0 0% 0 0 72.170562
protoboeuf-encode (click) 243065 308311 14 1816 0 0% 0 0 44.779834
rack (click) 281771 282780 35 580 0 0% 0 0 14.827136
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.742522
rubyboy (click) 691191 624794 154 6862 42 0% 0 0 167.398146
rubykon (click) 146229 153926 137 2070 3 0% 0 0 55.763542
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.537585
tinygql (click) 299293 254488 59 1031 5 0% 0 0 27.384694
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1928.920916
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.827682
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.06669
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.512848
fib (click) 2659 2995 3 30 0 0% 0 0 1.118051
getivar (click) 3789 6778 3 79 0 0% 0 0 1.943591
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.795855
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.851794
object-new (click) 2406 2818 2 36 0 0% 0 0 1.07543
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.125614
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.828967
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.755528
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.280317
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.475652
setivar (click) 2783 3726 3 46 0 0% 0 0 1.253085
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.402287
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.710853
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.44105
structaref (click) 4407 9095 3 88 0 0% 0 0 2.285724
throw (click) 5953 4624 5 53 0 0% 0 0 1.771429

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.