Ruby Benchmarks

Details for Benchmarks at 2026-06-08 01:27:59 UTC

YJIT metrics from the ruby-bench suite using Ruby 6be7b1f9c7.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 101.4% faster than CRuby 4.1.0dev
  • 11.6% faster than YJIT 3.4.7
On railsbench it is
  • 123.4% faster than CRuby 4.1.0dev
  • 17.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 52 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 192 50 240
chunky-png 5 31 5 30 50 33 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 444 50 615 50 684
liquid-compile 5 418 5 517 50 583 50 875
liquid-render 5 173 5 173 50 411 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 209 50 253 50 311
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 163 5 162 50 222 50 226
sequel 5 424 5 467 50 594 50 660
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 20
addressable-getters 5 164 5 171 50 182 50 216
addressable-join 5 74 5 84 50 63 50 86
addressable-merge 5 161 5 157 50 222 50 249
addressable-new 5 351 5 344 50 521 50 554
addressable-normalize 5 53 5 58 50 60 50 73
addressable-parse 5 104 5 107 50 103 50 124
addressable-setters 5 186 5 185 50 235 50 263
addressable-to-s 5 164 5 170 50 182 50 216
binarytrees 5 82 5 83 50 136 50 150
blurhash 5 84 5 83 50 145 50 145
erubi 5 140 5 143 50 142 50 145
etanni 5 100 5 78 50 72 50 44
fannkuchredux 5 55 5 57 50 101 50 98
fluentd 5 62 5 63 50 20 50 29
gcbench 5 10 5 10 50 10 50 18
graphql 5 367 5 463 50 571 50 986
graphql-native 5 58 5 92 50 22 50 67
knucleotide 5 163 5 149 50 117 50 102
lee 5 23 5 30 50 10 50 18
matmul 5 53 5 51 50 87 50 97
nbody 5 250 5 248 50 663 50 652
nqueens 5 119 5 126 50 554 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 185 50 697 50 818
protoboeuf-encode 5 200 5 195 50 800 50 799
rack 5 440 5 461 50 702 50 804
ruby-json 5 84 5 115 50 50 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 208 5 221 50 250 50 273
sudoku 5 48 5 50 50 155 50 169
tinygql 5 41 5 43 50 40 50 57
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 39 5 39 50 457 50 456
attr_accessor 5 156 5 186 50 1832 50 1899
cfunc_itself 5 347 5 316 50 1255 50 1258
fib 5 125 5 133 50 939 50 939
getivar 5 210 5 314 50 2305 50 2425
getivar-module 5 103 5 136 50 88 50 285
keyword_args 5 100 5 99 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 467 50 297 50 1527
object-new-initialize 5 169 5 234 50 260 50 1033
object-new-no-escape 5 81 5 137 50 89 50 521
respond_to 5 139 5 126 50 3902 50 3898
ruby-xor 5 247 5 232 50 1305 50 1308
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 106 5 104 50 304 50 287
send_rubyfunc_block 5 196 5 200 50 1372 50 1375
setivar 5 359 5 402 50 4928 50 4982
setivar_object 5 341 5 310 50 763 50 596
setivar_young 5 342 5 309 50 807 50 612
str_concat 5 391 5 436 50 1201 50 1086
structaref 5 153 5 191 50 1800 50 1882
structaset 5 198 5 215 50 369 50 481
throw 5 1108 5 1288 50 1444 50 1732

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) 1563058 1374684 203 2667 0 0% 0 0 78.632772
chunky-png (click) 325387 274948 79 1376 1 0% 0 0 38.016266
erubi-rails (click) 1383733 1145575 268 3626 23 0% 0 0 93.773631
hexapdf (click) 1532010 1318818 594 15771 44 0% 0 0 428.778666
liquid-c (click) 566617 526742 114 2240 5 0% 0 0 58.501762
liquid-compile (click) 481571 388389 146 2669 2 0% 0 0 73.844365
liquid-render (click) 672979 560024 131 2963 8 0% 0 0 77.243571
lobsters (click) 8569060 7294605 3124 63497 122 0% 0 0 2113.258308
mail (click) 876654 835318 345 7738 40 0% 0 0 208.838707
psych-load (click) 292700 277326 61 829 2 0% 0 0 23.044377
railsbench (click) 3356710 2971553 1592 19742 105 0% 0 0 535.17741
rubocop (click) 5798791 5073107 3003 57349 128 0% 6 0 1735.791569
ruby-lsp (click) 1052487 915562 409 7470 47 0% 1 0 199.614077
sequel (click) 508078 434723 11 119 0 0% 0 0 4.357472
shipit (click) 7052868 6009215 3176 51499 154 0% 0 0 1631.874356
addressable-equality (click) 325512 292953 44 1380 1 0% 0 0 33.216233
addressable-getters (click) 285844 235915 26 863 0 0% 0 0 20.519954
addressable-join (click) 289181 250304 24 941 0 0% 0 0 22.696344
addressable-merge (click) 291249 263350 27 896 0 0% 0 0 21.613679
addressable-new (click) 266080 228090 21 563 0 0% 0 0 13.618474
addressable-normalize (click) 318882 269310 43 1327 1 0% 0 0 31.85412
addressable-parse (click) 285607 258795 26 880 0 0% 0 0 21.023829
addressable-setters (click) 256307 225547 20 582 0 0% 0 0 14.091077
addressable-to-s (click) 285452 234869 26 849 0 0% 0 0 20.288069
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.725982
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.785754
erubi (click) 233271 219076 6 134 0 0% 0 0 3.988817
etanni (click) 32989 26478 8 114 0 0% 0 0 3.41526
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.929008
fluentd (click) 515304 450161 7 116 0 0% 0 0 3.693921
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.339701
graphql (click) 415700 354357 73 1931 19 0% 0 0 53.382562
graphql-native (click) 359050 336282 39 532 0 0% 0 0 13.543727
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.694719
lee (click) 318813 294182 49 1093 0 0% 0 0 30.220375
matmul (click) 11103 4709 8 136 0 0% 0 0 4.080903
nbody (click) 14448 21176 6 251 0 0% 0 0 6.145437
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.138404
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 105.812642
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.420947
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.840334
rack (click) 285906 244785 35 581 0 0% 0 0 14.567167
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.808986
rubyboy (click) 708516 641776 154 6871 42 0% 0 0 163.063944
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.684879
splay (click) 34617 22483 9 175 0 0% 0 0 5.202213
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.877935
tinygql (click) 285694 260177 59 1026 5 0% 0 0 26.599497
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1865.002066
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.878322
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.13096
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.512911
fib (click) 2659 2995 3 30 0 0% 0 0 1.101603
getivar (click) 3789 6778 3 79 0 0% 0 0 1.924063
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.315158
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.82375
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.896759
object-new (click) 2406 2818 2 36 0 0% 0 0 1.001094
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.30434
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.716731
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.126028
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.804903
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.790673
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.300706
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.789418
setivar (click) 2783 3726 3 46 0 0% 0 0 1.264782
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.366421
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.728639
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.439535
structaref (click) 4407 9095 3 88 0 0% 0 0 2.305888
structaset (click) 4113 5834 3 70 0 0% 0 0 1.787368
throw (click) 5953 4624 5 53 0 0% 0 0 1.752503

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.