Ruby Benchmarks

Details for Benchmarks at 2026-08-24 00:33:53 UTC

YJIT metrics from the ruby-bench suite using Ruby 05cb652056.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.5% faster than CRuby 4.1.0dev
  • 9.7% faster than YJIT 3.4.7
On railsbench it is
  • 117.0% faster than CRuby 4.1.0dev
  • 18.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 47 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 212
chunky-png 5 32 5 32 50 34 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 449 50 620 50 686
liquid-compile 5 419 5 520 50 582 50 844
liquid-il 5 67 5 69 50 116 50 136
liquid-render 5 170 5 174 50 430 50 471
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 254 50 299
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 246 50 245
ruby-lsp 5 153 5 165 50 225 50 236
sequel 5 428 5 464 50 590 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 165 5 175 50 183 50 216
addressable-join 5 75 5 87 50 66 50 87
addressable-merge 5 162 5 164 50 224 50 251
addressable-new 5 354 5 359 50 519 50 561
addressable-normalize 5 52 5 58 50 60 50 72
addressable-parse 5 104 5 111 50 104 50 126
addressable-setters 5 185 5 195 50 233 50 259
addressable-to-s 5 164 5 175 50 182 50 212
binarytrees 5 82 5 87 50 136 50 147
blurhash 5 83 5 87 50 145 50 145
erubi 5 137 5 151 50 126 50 153
etanni 5 100 5 80 50 73 50 47
fannkuchredux 5 55 5 57 50 101 50 112
fluentd 5 62 5 65 50 30 50 36
gcbench 5 10 5 11 50 10 50 16
graphql 5 371 5 473 50 569 50 986
graphql-native 5 57 5 88 50 21 50 70
knucleotide 5 163 5 153 50 117 50 106
lee 5 23 5 32 50 10 50 19
matmul 5 53 5 53 50 88 50 99
nbody 5 250 5 250 50 661 50 687
nqueens 5 119 5 126 50 554 50 596
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 188 50 696 50 823
protoboeuf-encode 5 201 5 208 50 801 50 773
rack 5 445 5 473 50 707 50 781
ruby-json 5 83 5 117 50 51 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 10
splay 5 209 5 213 50 250 50 291
string_malloc_pressure 5 145 5 32 50 101 50 10
sudoku 5 48 5 50 50 155 50 173
tinygql 5 42 5 45 50 40 50 57
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 39 50 458 50 459
attr_accessor 5 156 5 193 50 1834 50 1914
cfunc_itself 5 347 5 355 50 1255 50 1258
fib 5 125 5 142 50 939 50 939
getivar 5 215 5 319 50 2307 50 2430
getivar-module 5 103 5 136 50 89 50 124
keyword_args 5 102 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 485 50 299 50 1507
object-new-initialize 5 168 5 264 50 259 50 1022
object-new-no-escape 5 81 5 143 50 89 50 513
respond_to 5 139 5 129 50 3907 50 3902
ruby-xor 5 247 5 257 50 1305 50 1301
send_bmethod 5 118 5 122 50 5539 50 4527
send_cfunc_block 5 106 5 104 50 306 50 282
send_rubyfunc_block 5 196 5 201 50 1371 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 348 50 4930 50 4923
setivar_object 5 341 5 286 50 762 50 786
setivar_young 5 341 5 286 50 809 50 823
str_concat 5 392 5 421 50 1194 50 945
structaref 5 153 5 192 50 1800 50 1881
structaset 5 169 5 258 50 362 50 486
throw 5 1110 5 1445 50 1442 50 1912

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) 1563329 1409923 204 2669 0 0% 0 0 74.654385
chunky-png (click) 304293 226983 79 1376 1 0% 0 0 38.247956
erubi-rails (click) 1380181 1226763 268 3626 23 0% 0 0 95.113187
hexapdf (click) 1526392 1306181 593 15741 45 0% 0 0 432.172933
liquid-c (click) 559136 513515 113 2224 5 0% 0 0 61.560955
liquid-compile (click) 477642 436175 146 2666 2 0% 0 0 73.20937
liquid-il (click) 611237 531481 70 2722 0 0% 0 0 79.866064
liquid-render (click) 665467 595953 130 2946 8 0% 0 0 77.615639
lobsters (click) 8551714 7287243 3127 63344 125 0% 0 0 2031.637186
mail (click) 859447 826012 345 7716 40 0% 0 0 207.563545
psych-load (click) 285750 247817 60 829 2 0% 0 0 23.118099
railsbench (click) 3351909 3035651 1591 19737 105 0% 0 0 537.065306
rubocop (click) 5762600 5023229 3000 57026 132 0% 6 0 1620.103166
ruby-lsp (click) 1049431 922687 408 7449 47 0% 1 0 199.540802
sequel (click) 522995 472573 11 119 0 0% 0 0 4.148476
shipit (click) 6914228 5744175 3136 50335 147 0% 0 0 1660.583588
addressable-equality (click) 321375 306326 44 1381 1 0% 0 0 33.22846
addressable-getters (click) 281958 233156 26 863 0 0% 0 0 19.914359
addressable-join (click) 287448 241741 24 941 0 0% 0 0 22.590062
addressable-merge (click) 287202 235879 27 896 0 0% 0 0 21.120725
addressable-new (click) 262012 249683 21 563 0 0% 0 0 13.358175
addressable-normalize (click) 316749 268614 43 1327 1 0% 0 0 31.64724
addressable-parse (click) 284670 235026 26 880 0 0% 0 0 20.801786
addressable-setters (click) 264451 229821 20 582 0 0% 0 0 14.034005
addressable-to-s (click) 264526 244234 26 849 0 0% 0 0 19.736844
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.741163
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.868421
erubi (click) 246874 229434 6 134 0 0% 0 0 3.894762
etanni (click) 30080 23270 8 114 0 0% 0 0 3.454483
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.838649
fluentd (click) 512142 416656 7 116 0 0% 0 0 3.703781
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.547996
graphql (click) 413130 361629 74 1940 18 0% 0 0 52.818228
graphql-native (click) 358207 312820 39 532 0 0% 0 0 13.798621
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.771178
lee (click) 317370 270139 50 1102 0 0% 0 0 30.285947
matmul (click) 11103 4709 8 136 0 0% 0 0 4.073885
nbody (click) 14448 21176 6 251 0 0% 0 0 6.17432
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.239418
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.21068
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.730876
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.117427
rack (click) 283533 268639 35 581 0 0% 0 0 14.544049
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.758232
rubyboy (click) 703550 678667 154 6875 42 0% 0 0 163.852294
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.525148
splay (click) 34617 22483 9 175 0 0% 0 0 5.390635
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.825791
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.934408
tinygql (click) 300215 255336 59 1026 5 0% 0 0 26.353238
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1875.774522
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.724615
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.075626
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.487296
fib (click) 2659 2995 3 30 0 0% 0 0 1.097885
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936279
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.294644
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.846318
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.942979
object-new (click) 2406 2818 2 36 0 0% 0 0 0.970708
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.311899
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.768705
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.131037
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.782044
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.778635
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.3243
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.775976
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.085399
setivar (click) 2783 3726 3 46 0 0% 0 0 1.292901
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.402517
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.733095
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.457889
structaref (click) 4407 9095 3 88 0 0% 0 0 2.356916
structaset (click) 4113 5834 3 70 0 0% 0 0 1.779491
throw (click) 5953 4624 5 53 0 0% 0 0 1.775346

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.