Ruby Benchmarks

Details for Benchmarks at 2026-05-30 01:18:03 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.4% faster than CRuby 4.1.0dev
  • 10.0% faster than YJIT 3.4.7
On railsbench it is
  • 120.2% faster than CRuby 4.1.0dev
  • 17.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 51 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 94 50 198 50 224
chunky-png 5 32 5 31 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 446 50 620 50 681
liquid-compile 5 422 5 528 50 582 50 875
liquid-render 5 172 5 173 50 432 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 209 50 254 50 311
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 247 50 244
ruby-lsp 5 154 5 161 50 222 50 226
sequel 5 428 5 464 50 590 50 653
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 19
addressable-getters 5 165 5 174 50 183 50 215
addressable-join 5 75 5 85 50 64 50 86
addressable-merge 5 161 5 160 50 223 50 251
addressable-new 5 352 5 351 50 520 50 551
addressable-normalize 5 53 5 58 50 60 50 73
addressable-parse 5 103 5 109 50 105 50 124
addressable-setters 5 184 5 188 50 235 50 262
addressable-to-s 5 165 5 173 50 181 50 215
binarytrees 5 82 5 87 50 136 50 149
blurhash 5 82 5 83 50 145 50 145
erubi 5 138 5 148 50 140 50 151
etanni 5 100 5 78 50 72 50 45
fannkuchredux 5 55 5 57 50 99 50 110
fluentd 5 61 5 61 50 20 50 36
gcbench 5 10 5 10 50 10 50 18
graphql 5 361 5 467 50 530 50 999
graphql-native 5 59 5 91 50 22 50 75
knucleotide 5 163 5 142 50 117 50 95
lee 5 22 5 31 50 10 50 19
matmul 5 53 5 52 50 88 50 98
nbody 5 250 5 253 50 663 50 693
nqueens 5 119 5 121 50 555 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 698 50 827
protoboeuf-encode 5 200 5 202 50 800 50 813
rack 5 443 5 479 50 712 50 817
ruby-json 5 84 5 115 50 50 50 96
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 223 50 247 50 278
sudoku 5 48 5 50 50 155 50 168
tinygql 5 40 5 43 50 41 50 56
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 454 50 453
attr_accessor 5 156 5 178 50 1832 50 1875
cfunc_itself 5 347 5 315 50 1255 50 1258
fib 5 125 5 134 50 940 50 939
getivar 5 210 5 306 50 2315 50 2417
getivar-module 5 103 5 133 50 89 50 259
keyword_args 5 102 5 102 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 447 50 296 50 1526
object-new-initialize 5 169 5 233 50 260 50 1023
object-new-no-escape 5 81 5 138 50 89 50 518
respond_to 5 139 5 116 50 3895 50 3904
ruby-xor 5 247 5 235 50 1306 50 1295
send_bmethod 5 117 5 119 50 5540 50 4526
send_cfunc_block 5 106 5 107 50 305 50 276
send_rubyfunc_block 5 196 5 207 50 1372 50 1375
setivar 5 359 5 387 50 4929 50 4963
setivar_object 5 341 5 301 50 764 50 644
setivar_young 5 342 5 301 50 809 50 681
str_concat 5 392 5 447 50 1201 50 1142
structaref 5 153 5 175 50 1802 50 1852
structaset 5 198 5 223 50 370 50 489
throw 5 1111 5 1391 50 1440 50 1819

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) 1558947 1295997 203 2674 0 0% 0 0 78.92602
chunky-png (click) 324128 297592 79 1376 1 0% 0 0 37.717018
erubi-rails (click) 1386652 1174086 268 3626 23 0% 0 0 93.874346
hexapdf (click) 1536096 1331227 594 15827 44 0% 0 0 431.834681
liquid-c (click) 566605 485782 114 2240 5 0% 0 0 58.717831
liquid-compile (click) 489147 453537 146 2774 2 0% 0 0 78.486937
liquid-render (click) 663417 555678 131 2963 8 0% 0 0 77.845683
lobsters (click) 8600334 7303175 3125 63883 122 0% 0 0 2052.302514
mail (click) 873652 790434 345 7738 40 0% 0 0 210.353337
psych-load (click) 292171 243243 61 833 2 0% 0 0 23.833081
railsbench (click) 3360530 2804487 1592 19749 105 0% 0 0 537.025603
rubocop (click) 5803744 5046447 3002 57335 127 0% 6 0 1632.902016
ruby-lsp (click) 1052787 997646 409 7472 47 0% 1 0 199.858418
sequel (click) 495742 392483 11 119 0 0% 0 0 4.481831
shipit (click) 7176360 6079555 3119 50214 148 0% 0 0 1619.782845
addressable-equality (click) 316523 305799 44 1389 1 0% 0 0 33.697399
addressable-getters (click) 286357 236460 26 869 0 0% 0 0 20.811181
addressable-join (click) 289963 250628 24 941 0 0% 0 0 22.409201
addressable-merge (click) 291237 263350 27 896 0 0% 0 0 21.480036
addressable-new (click) 266593 228635 21 569 0 0% 0 0 13.95416
addressable-normalize (click) 320293 261957 43 1329 1 0% 0 0 31.947641
addressable-parse (click) 278905 257957 26 880 0 0% 0 0 20.841312
addressable-setters (click) 265833 253831 20 588 0 0% 0 0 14.036231
addressable-to-s (click) 285804 235203 26 853 0 0% 0 0 20.354774
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.761738
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.106483
erubi (click) 249236 213329 6 134 0 0% 0 0 3.776844
etanni (click) 32752 34339 8 114 0 0% 0 0 3.459346
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.821533
fluentd (click) 515884 450961 7 116 0 0% 0 0 3.597663
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.361018
graphql (click) 417720 372977 73 1931 19 0% 0 0 53.108669
graphql-native (click) 360987 322105 39 532 0 0% 0 0 13.363225
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.679927
lee (click) 320805 279713 49 1093 0 0% 0 0 30.212704
matmul (click) 11103 4709 8 136 0 0% 0 0 4.099753
nbody (click) 14448 21176 6 251 0 0% 0 0 6.170922
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.304491
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.624091
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.695946
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.008559
rack (click) 290479 242972 35 628 0 0% 0 0 15.663767
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.747981
rubyboy (click) 707740 640256 154 6871 42 0% 0 0 163.280571
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.331887
splay (click) 34953 22682 9 175 0 0% 0 0 5.245138
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.930834
tinygql (click) 304646 274779 59 1026 5 0% 0 0 26.489056
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1871.108911
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.125649
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.107809
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.53652
fib (click) 2659 2995 3 30 0 0% 0 0 1.099663
getivar (click) 3789 6778 3 79 0 0% 0 0 1.912755
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.337097
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.810516
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.936766
object-new (click) 2406 2818 2 36 0 0% 0 0 0.993933
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.271937
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.93604
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.16803
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.797303
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.821911
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.311439
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.725385
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251245
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406114
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.73445
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.447405
structaref (click) 4407 9095 3 88 0 0% 0 0 2.376385
structaset (click) 4113 5834 3 70 0 0% 0 0 1.805315
throw (click) 5953 4624 5 53 0 0% 0 0 1.748215

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.