Ruby Benchmarks

Details for Benchmarks at 2026-06-19 01:34:46 UTC

YJIT metrics from the ruby-bench suite using Ruby 062228c046.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.3% faster than CRuby 4.1.0dev
  • 9.7% faster than YJIT 3.4.7
On railsbench it is
  • 120.8% faster than CRuby 4.1.0dev
  • 16.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 59 minutes
aarch64 runtime: 7 hours, 49 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 92 5 97 50 200 50 236
chunky-png 5 31 5 30 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 440 50 618 50 679
liquid-compile 5 421 5 515 50 582 50 855
liquid-render 5 170 5 170 50 433 50 468
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 207 50 254 50 309
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 155 50 248 50 253
ruby-lsp 5 153 5 158 50 239 50 232
sequel 5 427 5 456 50 590 50 654
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 172 50 184 50 211
addressable-join 5 75 5 83 50 65 50 83
addressable-merge 5 161 5 158 50 223 50 244
addressable-new 5 350 5 346 50 521 50 542
addressable-normalize 5 53 5 57 50 61 50 71
addressable-parse 5 104 5 107 50 104 50 120
addressable-setters 5 186 5 187 50 233 50 256
addressable-to-s 5 164 5 172 50 182 50 211
binarytrees 5 81 5 87 50 136 50 144
blurhash 5 84 5 84 50 145 50 145
erubi 5 141 5 151 50 139 50 155
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 57 50 100 50 106
fluentd 5 61 5 60 50 20 50 26
gcbench 5 10 5 10 50 10 50 16
graphql 5 373 5 476 50 568 50 974
graphql-native 5 57 5 85 50 21 50 70
knucleotide 5 163 5 138 50 117 50 92
lee 5 23 5 30 50 10 50 16
matmul 5 53 5 52 50 87 50 97
nbody 5 250 5 249 50 663 50 636
nqueens 5 119 5 129 50 554 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 178 50 694 50 799
protoboeuf-encode 5 200 5 200 50 800 50 789
rack 5 445 5 469 50 709 50 792
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 199 50 250 50 235
sudoku 5 48 5 50 50 155 50 168
tinygql 5 42 5 44 50 40 50 56
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 454 50 452
attr_accessor 5 156 5 191 50 1832 50 1900
cfunc_itself 5 346 5 312 50 1255 50 1255
fib 5 125 5 136 50 939 50 938
getivar 5 210 5 357 50 2304 50 2450
getivar-module 5 103 5 142 50 89 50 286
keyword_args 5 102 5 106 50 1236 50 1239
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 477 50 295 50 1443
object-new-initialize 5 168 5 236 50 259 50 981
object-new-no-escape 5 80 5 138 50 89 50 506
respond_to 5 139 5 123 50 3898 50 3891
ruby-xor 5 247 5 242 50 1305 50 1307
send_bmethod 5 117 5 108 50 5538 50 4526
send_cfunc_block 5 106 5 105 50 305 50 290
send_rubyfunc_block 5 196 5 198 50 1371 50 1372
setivar 5 359 5 399 50 4928 50 4979
setivar_object 5 341 5 305 50 759 50 599
setivar_young 5 341 5 306 50 808 50 608
str_concat 5 391 5 434 50 1201 50 1053
structaref 5 153 5 201 50 1799 50 1892
structaset 5 197 5 222 50 369 50 484
throw 5 1110 5 1373 50 1438 50 1780

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) 1563235 1342988 203 2667 0 0% 0 0 73.878742
chunky-png (click) 313967 243809 79 1376 1 0% 0 0 38.212295
erubi-rails (click) 1389155 1234491 268 3626 23 0% 0 0 93.548336
hexapdf (click) 1534818 1281043 593 15768 44 0% 0 0 425.212959
liquid-c (click) 567735 430438 114 2240 5 0% 0 0 58.864792
liquid-compile (click) 482684 390384 146 2669 2 0% 0 0 77.362521
liquid-render (click) 670324 590204 131 2963 8 0% 0 0 77.640643
lobsters (click) 8551650 7200869 3125 63417 122 0% 0 0 2018.029599
mail (click) 865545 837616 345 7738 40 0% 0 0 208.231214
psych-load (click) 290670 242282 61 829 2 0% 0 0 23.699362
railsbench (click) 3361674 2716272 1592 19741 105 0% 0 0 535.803272
rubocop (click) 5809928 5118571 3002 57381 127 0% 6 0 1626.455285
ruby-lsp (click) 1053628 876577 409 7470 47 0% 1 0 199.581063
sequel (click) 507517 426162 11 119 0 0% 0 0 4.049801
shipit (click) 6883060 5750720 3135 50032 147 0% 0 0 1616.085639
addressable-equality (click) 325512 292953 44 1380 1 0% 0 0 33.190211
addressable-getters (click) 283807 250003 26 863 0 0% 0 0 20.42878
addressable-join (click) 291218 252600 24 941 0 0% 0 0 23.038459
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.466272
addressable-new (click) 254658 221507 21 563 0 0% 0 0 13.491162
addressable-normalize (click) 320919 287990 43 1327 1 0% 0 0 31.673024
addressable-parse (click) 277408 255883 26 880 0 0% 0 0 20.996467
addressable-setters (click) 263954 227862 20 582 0 0% 0 0 14.120303
addressable-to-s (click) 281684 246670 26 849 0 0% 0 0 19.913415
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.753248
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.821106
erubi (click) 250205 231349 6 134 0 0% 0 0 3.802637
etanni (click) 32989 26478 8 114 0 0% 0 0 3.388543
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.745577
fluentd (click) 519223 455094 7 116 0 0% 0 0 3.608265
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.371754
graphql (click) 418351 373967 74 1940 19 0% 0 0 52.528937
graphql-native (click) 361705 347720 39 532 0 0% 0 0 13.724614
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.686982
lee (click) 322390 306895 50 1102 0 0% 0 0 30.322636
matmul (click) 11103 4709 8 136 0 0% 0 0 4.12127
nbody (click) 14448 21176 6 251 0 0% 0 0 6.106274
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.222497
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.433242
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.410464
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.873496
rack (click) 288557 239839 35 581 0 0% 0 0 14.499234
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.740555
rubyboy (click) 706540 647740 154 6871 42 0% 0 0 163.338654
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.73674
splay (click) 34617 22483 9 175 0 0% 0 0 5.357064
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.797567
tinygql (click) 302633 239715 59 1026 5 0% 0 0 26.367813
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1861.357684
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.355232
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.057679
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.52912
fib (click) 2659 2995 3 30 0 0% 0 0 1.075547
getivar (click) 3789 6778 3 79 0 0% 0 0 1.953432
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.324005
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.783674
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.929275
object-new (click) 2406 2818 2 36 0 0% 0 0 0.971865
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.312863
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.772588
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.14738
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.786652
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.818349
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.276847
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.739627
setivar (click) 2783 3726 3 46 0 0% 0 0 1.256866
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406812
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.706075
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.485907
structaref (click) 4407 9095 3 88 0 0% 0 0 2.330387
structaset (click) 4113 5834 3 70 0 0% 0 0 1.78447
throw (click) 5953 4624 5 53 0 0% 0 0 1.74132

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.