Ruby Benchmarks

Details for Benchmarks at 2026-03-30 01:00:54 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.4% faster than CRuby 4.1.0dev
  • 4.5% faster than YJIT 3.4.7
On railsbench it is
  • 113.0% faster than CRuby 4.1.0dev
  • 10.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 59 minutes
aarch64 runtime: 7 hours, 46 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.1.0dev warmups CRuby 4.1.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.1.0dev warmups YJIT 4.1.0dev iters
activerecord 5 91 5 96 50 200 50 242
chunky-png 5 32 5 28 50 34 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 434 50 620 50 645
liquid-compile 5 421 5 476 50 578 50 683
liquid-render 5 174 5 174 50 431 50 355
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 198 50 254 50 274
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 246 50 258
ruby-lsp 5 157 5 164 50 240 50 240
sequel 5 428 5 434 50 580 50 605
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 28 50 12 50 13
addressable-getters 5 164 5 171 50 183 50 200
addressable-join 5 73 5 83 50 63 50 74
addressable-merge 5 160 5 155 50 222 50 228
addressable-new 5 354 5 346 50 521 50 539
addressable-normalize 5 53 5 56 50 60 50 62
addressable-parse 5 104 5 104 50 104 50 115
addressable-setters 5 184 5 182 50 232 50 241
addressable-to-s 5 165 5 167 50 183 50 200
binarytrees 5 82 5 84 50 136 50 158
blurhash 5 84 5 77 50 145 50 145
erubi 5 140 5 149 50 140 50 151
etanni 5 100 5 74 50 73 50 43
fannkuchredux 5 55 5 57 50 101 50 106
fluentd 5 56 5 65 50 20 50 31
gcbench 5 10 5 10 50 10 50 16
graphql 5 373 5 448 50 571 50 963
graphql-native 5 57 5 89 50 23 50 71
knucleotide 5 163 5 163 50 117 50 117
lee 5 23 5 29 50 10 50 13
matmul 5 53 5 54 50 88 50 96
nbody 5 250 5 271 50 663 50 698
nqueens 5 119 5 120 50 554 50 572
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 182 50 696 50 805
protoboeuf-encode 5 201 5 197 50 799 50 808
rack 5 439 5 450 50 713 50 612
ruby-json 5 84 5 100 50 50 50 74
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 230 50 247 50 280
sudoku 5 48 5 49 50 155 50 158
tinygql 5 42 5 40 50 40 50 49
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 40 50 451 50 457
attr_accessor 5 156 5 180 50 1832 50 1888
cfunc_itself 5 348 5 305 50 1255 50 1259
fib 5 125 5 132 50 939 50 939
getivar 5 216 5 278 50 2315 50 2391
getivar-module 5 103 5 113 50 88 50 253
keyword_args 5 102 5 99 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 61
object-new 5 268 5 428 50 295 50 1137
object-new-initialize 5 169 5 209 50 259 50 839
object-new-no-escape 5 80 5 130 50 89 50 407
respond_to 5 139 5 129 50 3903 50 3895
ruby-xor 5 247 5 227 50 1305 50 1297
send_bmethod 5 118 5 115 50 5539 50 4525
send_cfunc_block 5 106 5 106 50 354 50 382
send_rubyfunc_block 5 243 5 261 50 6921 50 6922
setivar 5 359 5 475 50 4929 50 5039
setivar_object 5 349 5 300 50 764 50 548
setivar_young 5 342 5 303 50 808 50 563
str_concat 5 391 5 432 50 1201 50 1185
structaref 5 153 5 179 50 1798 50 1859
structaset 5 199 5 223 50 369 50 482
throw 5 1112 5 1282 50 1443 50 1749

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) 1556159 1311133 203 2657 0 0% 0 0 73.774826
chunky-png (click) 321903 294941 79 1376 1 0% 0 0 38.554162
erubi-rails (click) 1364409 1222046 268 3574 22 0% 0 0 92.783711
hexapdf (click) 1503558 1355925 593 15431 44 0% 0 0 421.341062
liquid-c (click) 556735 501005 114 2227 5 0% 0 0 58.335586
liquid-compile (click) 473131 388702 146 2608 2 0% 0 0 73.205346
liquid-render (click) 639474 593006 132 2622 6 0% 0 0 68.849134
lobsters (click) 8318429 6926981 3115 60505 119 0% 0 0 1989.090223
mail (click) 873330 831544 345 7728 40 0% 0 0 208.798721
psych-load (click) 291065 234124 61 808 2 0% 0 0 23.070474
railsbench (click) 3311620 2807370 1592 19219 97 0% 0 0 521.472332
rubocop (click) 5764582 4926939 3003 56911 126 0% 6 0 1626.451744
ruby-lsp (click) 1042848 928076 409 7462 47 0% 1 0 201.625231
sequel (click) 500284 418411 11 94 0 0% 0 0 3.076961
shipit (click) 6790929 5693357 3131 49272 142 0% 0 0 1577.924874
addressable-equality (click) 313419 238733 44 1323 1 0% 0 0 32.003278
addressable-getters (click) 265126 195200 26 905 0 0% 0 0 21.347226
addressable-join (click) 279277 203842 24 861 0 0% 0 0 21.067965
addressable-merge (click) 284924 231944 27 896 0 0% 0 0 21.850512
addressable-new (click) 258966 203411 21 565 0 0% 0 0 13.881591
addressable-normalize (click) 312281 295106 43 1289 1 0% 0 0 30.755919
addressable-parse (click) 282397 239363 26 882 0 0% 0 0 21.509833
addressable-setters (click) 258221 221214 20 582 0 0% 0 0 14.129155
addressable-to-s (click) 279127 244423 26 849 0 0% 0 0 20.443936
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.780262
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.917837
erubi (click) 251493 216379 6 134 0 0% 0 0 3.800945
etanni (click) 32494 34168 8 114 0 0% 0 0 3.400378
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.877881
fluentd (click) 489032 411157 7 116 0 0% 0 0 3.658418
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.409904
graphql (click) 413620 336057 73 1909 19 0% 0 0 52.595279
graphql-native (click) 358098 327162 39 532 0 0% 0 0 13.65507
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.740404
lee (click) 320662 295877 49 1085 0 0% 0 0 30.510833
matmul (click) 11103 4709 8 136 0 0% 0 0 4.190981
nbody (click) 14448 21176 6 251 0 0% 0 0 6.123488
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.26633
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 107.175553
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.830456
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.268589
rack (click) 259882 242666 35 434 0 0% 0 0 11.26639
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.757128
rubyboy (click) 705456 572612 154 6871 42 0% 0 0 165.787746
rubykon (click) 150957 150670 138 2135 4 0% 0 0 56.335
splay (click) 23803 16994 9 74 0 0% 0 0 2.569393
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.76476
tinygql (click) 303109 289138 59 1037 5 0% 0 0 26.992807
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1885.473796
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.331215
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.112751
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.532283
fib (click) 2659 2995 3 30 0 0% 0 0 1.118197
getivar (click) 3789 6778 3 79 0 0% 0 0 1.926885
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.33791
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.801994
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.878044
object-new (click) 2406 2818 2 36 0 0% 0 0 1.094743
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.302764
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.990278
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.129004
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.819874
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.79839
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.780474
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.46663
setivar (click) 2783 3726 3 46 0 0% 0 0 1.27706
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406299
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.739703
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.461455
structaref (click) 4407 9095 3 88 0 0% 0 0 2.338414
structaset (click) 4113 5834 3 70 0 0% 0 0 1.802889
throw (click) 5410 4014 5 44 0 0% 0 0 1.549585

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.