Ruby Benchmarks

Details for Benchmarks at 2025-11-20 00:39:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 167c3dbaa0.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 84.1% faster than CRuby 4.0.0dev
  • 2.8% slower than YJIT 3.4.7
On railsbench it is
  • 102.7% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 6 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 82 5 87 50 194 50 223
chunky-png 5 31 5 32 50 32 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 392 50 629 50 555
liquid-compile 5 405 5 470 50 552 50 687
liquid-render 5 173 5 169 50 413 50 385
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 180 50 252 50 112
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 245 50 242
ruby-lsp 5 142 5 148 50 227 50 239
sequel 5 426 5 429 50 584 50 599
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 162 50 185 50 185
addressable-join 5 74 5 51 50 65 50 12
addressable-merge 5 160 5 154 50 219 50 210
addressable-new 5 354 5 344 50 526 50 502
addressable-normalize 5 54 5 53 50 59 50 55
addressable-parse 5 103 5 102 50 105 50 101
addressable-setters 5 184 5 177 50 230 50 219
addressable-to-s 5 163 5 163 50 182 50 184
binarytrees 5 82 5 82 50 136 50 129
blurhash 5 83 5 87 50 143 50 145
erubi 5 128 5 143 50 127 50 131
etanni 5 97 5 67 50 71 50 33
fannkuchredux 5 55 5 56 50 102 50 98
fluentd 5 56 5 62 50 30 50 32
graphql 5 373 5 459 50 533 50 922
graphql-native 5 59 5 83 50 22 50 63
knucleotide 5 163 5 158 50 118 50 113
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 52 50 95 50 90
nbody 5 246 5 267 50 676 50 674
nqueens 5 116 5 125 50 556 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 180 50 706 50 695
protoboeuf-encode 5 194 5 206 50 827 50 784
rack 5 435 5 434 50 719 50 683
ruby-json 5 82 5 93 50 47 50 64
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 48 50 157 50 150
tinygql 5 42 5 42 50 40 50 47
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 458 50 455
attr_accessor 5 157 5 201 50 1835 50 1926
cfunc_itself 5 348 5 349 50 1254 50 1259
fib 5 124 5 142 50 940 50 940
getivar 5 215 5 291 50 2313 50 2402
keyword_args 5 99 5 109 50 1239 50 1243
loops-times 5 23 5 24 50 64 50 57
object-new 5 268 5 358 50 297 50 592
respond_to 5 139 5 139 50 3893 50 3897
ruby-xor 5 236 5 240 50 1315 50 1290
send_bmethod 5 116 5 126 50 5538 50 5538
send_cfunc_block 5 105 5 104 50 353 50 339
send_rubyfunc_block 5 251 5 245 50 6920 50 6915
setivar 5 359 5 364 50 4925 50 4941
setivar_object 5 341 5 322 50 748 50 572
setivar_young 5 348 5 324 50 795 50 593
str_concat 5 391 5 440 50 1199 50 1202
structaref 5 157 5 185 50 1810 50 1872
structaset 5 202 5 218 50 396 50 355
throw 5 1089 5 1187 50 1420 50 1588

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) 1550986 1316085 205 2579 0 0% 0 0 78.27186
chunky-png (click) 317368 284460 74 1322 1 0% 0 0 37.360181
erubi-rails (click) 1373513 1217742 267 3623 22 0% 0 0 96.091337
hexapdf (click) 1525834 1375459 593 15680 44 0% 0 0 438.159789
liquid-c (click) 556463 487929 114 2228 5 0% 0 0 60.000979
liquid-compile (click) 481526 409461 146 2739 2 0% 0 0 80.387275
liquid-render (click) 662826 644362 131 2946 8 0% 0 0 79.547336
lobsters (click) 8510098 7034037 3101 62241 120 0% 0 0 2160.494503
mail (click) 865626 843987 342 7700 40 0% 0 0 213.816948
psych-load (click) 289049 275425 61 832 2 0% 0 0 23.769895
railsbench (click) 3355343 2752458 1605 19610 47 0% 0 0 547.721645
rubocop (click) 5761020 4925226 3001 56850 127 0% 6 0 1665.12602
ruby-lsp (click) 964261 925510 346 6760 44 0% 1 0 180.965558
sequel (click) 494561 436866 11 119 0 0% 0 0 4.031168
shipit (click) 7602147 6366852 3262 51851 180 0% 0 0 1703.890136
addressable-equality (click) 319249 271476 44 1385 1 0% 0 0 33.991789
addressable-getters (click) 279514 214145 26 863 0 0% 0 0 20.89883
addressable-join (click) 284643 263350 24 941 0 0% 0 0 23.481619
addressable-merge (click) 284816 241450 27 898 0 0% 0 0 22.247048
addressable-new (click) 259587 214335 21 563 0 0% 0 0 13.934444
addressable-normalize (click) 315283 250923 43 1337 1 0% 0 0 32.752751
addressable-parse (click) 283074 208806 26 894 0 0% 0 0 22.088621
addressable-setters (click) 259695 241116 20 582 0 0% 0 0 14.255151
addressable-to-s (click) 278843 237427 26 849 0 0% 0 0 20.498358
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.861129
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.029553
erubi (click) 248269 215647 6 134 0 0% 0 0 3.932034
etanni (click) 32930 35718 8 114 0 0% 0 0 3.584218
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.991572
fluentd (click) 491395 426210 7 115 0 0% 0 0 3.747066
graphql (click) 410784 378618 73 1921 19 0% 0 0 53.699577
graphql-native (click) 355239 304231 39 532 0 0% 0 0 13.71519
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.867164
lee (click) 307151 268487 49 1097 0 0% 0 0 31.371088
matmul (click) 11103 4709 8 136 0 0% 0 0 4.230597
nbody (click) 14448 21176 6 251 0 0% 0 0 6.138661
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.374577
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.616044
protoboeuf (click) 170129 251445 12 2837 0 0% 0 0 72.992557
protoboeuf-encode (click) 243065 308311 14 1816 0 0% 0 0 44.257688
rack (click) 281461 257729 35 580 0 0% 0 0 15.396317
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.67915
rubyboy (click) 704058 556669 154 6864 42 0% 0 0 166.662319
rubykon (click) 145511 144902 137 2062 3 0% 0 0 56.398389
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.482788
tinygql (click) 301257 272399 59 1031 5 0% 0 0 26.789379
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1927.61328
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.417257
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.089317
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.525422
fib (click) 2659 2995 3 30 0 0% 0 0 1.13236
getivar (click) 3789 6778 3 79 0 0% 0 0 1.933274
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.826864
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.917601
object-new (click) 2406 2818 2 36 0 0% 0 0 1.108722
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.155121
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.861365
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.738024
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.296955
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.495576
setivar (click) 2783 3726 3 46 0 0% 0 0 1.290865
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.423293
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.697454
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.42797
structaref (click) 4407 9095 3 88 0 0% 0 0 2.345612
structaset (click) 3926 5614 3 70 0 0% 0 0 1.743233
throw (click) 5953 4624 5 53 0 0% 0 0 1.842614

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.