Ruby Benchmarks

Details for Benchmarks at 2026-04-01 01:04:12 UTC

YJIT metrics from the ruby-bench suite using Ruby 20af0e90c6.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.6% faster than CRuby 4.1.0dev
  • 4.0% faster than YJIT 3.4.7
On railsbench it is
  • 108.3% faster than CRuby 4.1.0dev
  • 10.4% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 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 90 5 95 50 194 50 243
chunky-png 5 32 5 30 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 428 50 623 50 628
liquid-compile 5 418 5 476 50 578 50 684
liquid-render 5 170 5 171 50 432 50 352
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 201 50 254 50 290
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 248 50 236
ruby-lsp 5 156 5 164 50 222 50 241
sequel 5 427 5 437 50 584 50 598
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 28 50 12 50 12
addressable-getters 5 164 5 165 50 184 50 196
addressable-join 5 74 5 78 50 64 50 71
addressable-merge 5 160 5 152 50 223 50 220
addressable-new 5 353 5 336 50 520 50 515
addressable-normalize 5 53 5 53 50 60 50 57
addressable-parse 5 104 5 102 50 104 50 109
addressable-setters 5 185 5 172 50 234 50 228
addressable-to-s 5 164 5 165 50 183 50 194
binarytrees 5 82 5 85 50 136 50 162
blurhash 5 84 5 84 50 145 50 145
erubi 5 141 5 143 50 135 50 147
etanni 5 100 5 79 50 73 50 46
fannkuchredux 5 55 5 55 50 100 50 108
fluentd 5 56 5 62 50 21 50 38
gcbench 5 10 5 10 50 10 50 16
graphql 5 365 5 439 50 571 50 950
graphql-native 5 58 5 88 50 20 50 69
knucleotide 5 163 5 141 50 118 50 95
lee 5 22 5 29 50 10 50 13
matmul 5 53 5 56 50 88 50 98
nbody 5 250 5 279 50 663 50 704
nqueens 5 119 5 123 50 554 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 179 50 697 50 807
protoboeuf-encode 5 201 5 195 50 801 50 830
rack 5 442 5 433 50 713 50 591
ruby-json 5 83 5 106 50 50 50 81
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 223 50 250 50 274
sudoku 5 48 5 49 50 155 50 160
tinygql 5 41 5 42 50 40 50 52
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 38 5 39 50 455 50 460
attr_accessor 5 157 5 183 50 1831 50 1896
cfunc_itself 5 347 5 312 50 1255 50 1259
fib 5 124 5 134 50 939 50 939
getivar 5 215 5 292 50 2306 50 2404
getivar-module 5 103 5 129 50 89 50 263
keyword_args 5 103 5 103 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 472 50 297 50 1489
object-new-initialize 5 168 5 254 50 259 50 943
object-new-no-escape 5 81 5 139 50 89 50 509
respond_to 5 139 5 129 50 3901 50 3886
ruby-xor 5 247 5 231 50 1305 50 1292
send_bmethod 5 118 5 116 50 5539 50 4526
send_cfunc_block 5 107 5 106 50 354 50 382
send_rubyfunc_block 5 244 5 262 50 6923 50 6910
setivar 5 359 5 473 50 4930 50 5039
setivar_object 5 341 5 348 50 760 50 669
setivar_young 5 342 5 347 50 809 50 695
str_concat 5 391 5 450 50 1201 50 1174
structaref 5 153 5 190 50 1800 50 1882
structaset 5 195 5 229 50 370 50 482
throw 5 1109 5 1363 50 1443 50 1807

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) 1548932 1358567 203 2660 0 0% 0 0 75.115279
chunky-png (click) 305926 251496 79 1376 1 0% 0 0 38.53204
erubi-rails (click) 1372433 1207198 268 3613 22 0% 0 0 94.318403
hexapdf (click) 1506052 1350521 593 15436 44 0% 0 0 423.019159
liquid-c (click) 561296 498200 114 2227 5 0% 0 0 58.898222
liquid-compile (click) 475533 416442 146 2613 2 0% 0 0 73.845027
liquid-render (click) 642352 539574 132 2622 6 0% 0 0 69.342806
lobsters (click) 8304767 7015469 3116 60452 119 0% 0 0 1974.856629
mail (click) 876611 767834 345 7728 40 0% 0 0 212.25791
psych-load (click) 289779 256845 61 808 2 0% 0 0 22.873719
railsbench (click) 3312373 2881701 1592 19221 97 0% 0 0 526.332428
rubocop (click) 5765459 4968623 3003 56930 126 0% 6 0 1723.923749
ruby-lsp (click) 1041475 975095 409 7462 47 0% 1 0 199.542168
sequel (click) 485085 438439 11 94 0 0% 0 0 3.058852
shipit (click) 6817972 5713248 3131 49252 142 0% 0 0 1607.375868
addressable-equality (click) 316658 267541 44 1326 1 0% 0 0 31.576852
addressable-getters (click) 283683 242156 26 905 0 0% 0 0 22.547538
addressable-join (click) 273277 236788 24 865 0 0% 0 0 21.223069
addressable-merge (click) 287282 259122 27 900 0 0% 0 0 22.760908
addressable-new (click) 254273 221573 21 595 0 0% 0 0 14.456627
addressable-normalize (click) 314444 288989 43 1308 1 0% 0 0 31.510325
addressable-parse (click) 283848 256681 26 886 0 0% 0 0 22.301364
addressable-setters (click) 244531 220550 20 588 0 0% 0 0 14.351917
addressable-to-s (click) 274143 228973 26 893 0 0% 0 0 21.826707
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.816225
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.951544
erubi (click) 232534 177234 6 134 0 0% 0 0 3.879712
etanni (click) 32731 34499 8 114 0 0% 0 0 3.48365
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.900937
fluentd (click) 493743 400927 7 116 0 0% 0 0 3.769376
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.50223
graphql (click) 413938 336373 73 1913 19 0% 0 0 52.830814
graphql-native (click) 358098 327162 39 532 0 0% 0 0 13.710053
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.711712
lee (click) 320662 295877 49 1085 0 0% 0 0 30.520387
matmul (click) 11103 4709 8 136 0 0% 0 0 4.178424
nbody (click) 14448 21176 6 251 0 0% 0 0 6.135986
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.297657
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 107.120892
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.814237
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.202221
rack (click) 282407 262126 35 486 0 0% 0 0 12.413151
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.742548
rubyboy (click) 707603 640538 154 6867 42 0% 0 0 166.624815
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.674815
splay (click) 23803 16994 9 74 0 0% 0 0 2.66927
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.845926
tinygql (click) 301329 270387 59 1037 5 0% 0 0 26.88967
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1869.283278
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.286857
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.09154
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.541875
fib (click) 2659 2995 3 30 0 0% 0 0 1.123367
getivar (click) 3789 6778 3 79 0 0% 0 0 1.975358
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.354915
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.845427
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.956831
object-new (click) 2406 2818 2 36 0 0% 0 0 1.008495
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.285689
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.056573
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.153346
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.790852
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.823467
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.787142
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.486114
setivar (click) 2783 3726 3 46 0 0% 0 0 1.268473
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.426439
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.742716
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.426374
structaref (click) 4407 9095 3 88 0 0% 0 0 2.383436
structaset (click) 4113 5834 3 70 0 0% 0 0 1.798607
throw (click) 5410 4014 5 44 0 0% 0 0 1.577773

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.