Ruby Benchmarks

Details for Benchmarks at 2026-08-22 00:33:45 UTC

YJIT metrics from the ruby-bench suite using Ruby 9f7d597b58.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.2% faster than CRuby 4.1.0dev
  • 8.6% faster than YJIT 3.4.7
On railsbench it is
  • 119.8% faster than CRuby 4.1.0dev
  • 16.4% 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 90 5 96 50 204 50 235
chunky-png 5 32 5 32 50 35 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 444 50 631 50 660
liquid-compile 5 421 5 528 50 576 50 845
liquid-il 5 66 5 68 50 117 50 135
liquid-render 5 170 5 172 50 431 50 464
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 253 50 300
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 247
ruby-lsp 5 163 5 160 50 222 50 230
sequel 5 427 5 463 50 597 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 19
addressable-getters 5 165 5 178 50 185 50 214
addressable-join 5 74 5 85 50 66 50 85
addressable-merge 5 161 5 165 50 223 50 249
addressable-new 5 351 5 357 50 519 50 554
addressable-normalize 5 53 5 59 50 60 50 71
addressable-parse 5 104 5 110 50 104 50 121
addressable-setters 5 184 5 192 50 234 50 260
addressable-to-s 5 164 5 176 50 183 50 212
binarytrees 5 81 5 86 50 136 50 170
blurhash 5 84 5 85 50 145 50 145
erubi 5 129 5 151 50 121 50 153
etanni 5 100 5 80 50 73 50 46
fannkuchredux 5 55 5 56 50 100 50 112
fluentd 5 63 5 67 50 28 50 33
gcbench 5 10 5 10 50 10 50 16
graphql 5 371 5 479 50 570 50 973
graphql-native 5 58 5 83 50 21 50 69
knucleotide 5 163 5 153 50 117 50 107
lee 5 23 5 32 50 10 50 19
matmul 5 53 5 49 50 88 50 98
nbody 5 250 5 253 50 663 50 678
nqueens 5 119 5 126 50 554 50 597
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 696 50 812
protoboeuf-encode 5 200 5 200 50 796 50 795
rack 5 438 5 455 50 703 50 726
ruby-json 5 84 5 118 50 51 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 214 50 250 50 249
string_malloc_pressure 5 147 5 32 50 105 50 10
sudoku 5 48 5 49 50 155 50 167
tinygql 5 41 5 45 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 453 50 459
attr_accessor 5 156 5 187 50 1833 50 1904
cfunc_itself 5 346 5 353 50 1255 50 1258
fib 5 125 5 145 50 939 50 939
getivar 5 210 5 306 50 2305 50 2418
getivar-module 5 103 5 134 50 88 50 124
keyword_args 5 103 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 485 50 297 50 1501
object-new-initialize 5 169 5 264 50 259 50 1022
object-new-no-escape 5 81 5 142 50 89 50 529
respond_to 5 139 5 128 50 3906 50 3899
ruby-xor 5 246 5 256 50 1306 50 1301
send_bmethod 5 118 5 122 50 5540 50 4528
send_cfunc_block 5 107 5 108 50 305 50 280
send_rubyfunc_block 5 196 5 202 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 348 50 4931 50 4922
setivar_object 5 341 5 286 50 761 50 784
setivar_young 5 342 5 286 50 809 50 818
str_concat 5 391 5 425 50 1195 50 927
structaref 5 153 5 185 50 1800 50 1870
structaset 5 198 5 268 50 370 50 492
throw 5 1111 5 1332 50 1448 50 1696

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) 1562548 1409615 204 2664 0 0% 0 0 79.115778
chunky-png (click) 323272 274340 79 1376 1 0% 0 0 38.048618
erubi-rails (click) 1378718 1191811 268 3626 23 0% 0 0 100.061603
hexapdf (click) 1527250 1339410 593 15740 45 0% 0 0 433.789807
liquid-c (click) 560117 505844 113 2224 5 0% 0 0 61.729317
liquid-compile (click) 476672 409963 146 2666 2 0% 0 0 73.352406
liquid-il (click) 603886 530390 70 2723 0 0% 0 0 79.930232
liquid-render (click) 666448 596434 130 2946 8 0% 0 0 76.985301
lobsters (click) 8528287 7261822 3127 63131 125 0% 0 0 2020.919211
mail (click) 869853 839033 345 7716 40 0% 0 0 208.222672
psych-load (click) 278108 262991 60 829 2 0% 0 0 23.294888
railsbench (click) 3352136 3117718 1591 19736 105 0% 0 0 536.71556
rubocop (click) 5761640 4955985 3000 57026 132 0% 6 0 1622.630967
ruby-lsp (click) 1048479 945681 408 7449 47 0% 1 0 200.430618
sequel (click) 520845 461711 11 119 0 0% 0 0 4.676376
shipit (click) 6955102 5711016 3129 49849 147 0% 0 0 1591.720041
addressable-equality (click) 322654 282547 44 1381 1 0% 0 0 33.539143
addressable-getters (click) 282937 282789 26 863 0 0% 0 0 20.079257
addressable-join (click) 284795 246599 24 941 0 0% 0 0 22.651388
addressable-merge (click) 288460 277548 27 896 0 0% 0 0 21.129585
addressable-new (click) 264256 227540 21 563 0 0% 0 0 13.572445
addressable-normalize (click) 318012 285712 43 1327 1 0% 0 0 31.593402
addressable-parse (click) 285649 276467 26 880 0 0% 0 0 20.583955
addressable-setters (click) 263481 236372 20 582 0 0% 0 0 13.875841
addressable-to-s (click) 282545 248975 26 849 0 0% 0 0 19.758805
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.77898
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.779689
erubi (click) 246874 229434 6 134 0 0% 0 0 3.879468
etanni (click) 30039 31433 8 114 0 0% 0 0 3.445632
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.835834
fluentd (click) 509255 404295 7 116 0 0% 0 0 3.546366
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.483537
graphql (click) 414111 394863 74 1940 18 0% 0 0 53.069285
graphql-native (click) 358207 312820 39 532 0 0% 0 0 13.719609
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.780718
lee (click) 319316 313221 50 1102 0 0% 0 0 30.552161
matmul (click) 11103 4709 8 136 0 0% 0 0 4.099648
nbody (click) 14448 21176 6 251 0 0% 0 0 6.12576
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.173101
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.374532
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.922538
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.490791
rack (click) 284517 211756 35 581 0 0% 0 0 14.908625
ruby-json (click) 19522 17429 8 210 0 0% 0 0 5.83517
rubyboy (click) 704531 646380 154 6875 42 0% 0 0 163.142996
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.873387
splay (click) 34617 22483 9 175 0 0% 0 0 5.266869
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.719872
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.926551
tinygql (click) 292582 270593 59 1026 5 0% 0 0 26.549658
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1873.443636
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.928319
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.110696
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.516617
fib (click) 2659 2995 3 30 0 0% 0 0 1.080014
getivar (click) 3789 6778 3 79 0 0% 0 0 1.908516
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.327148
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.813156
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.867756
object-new (click) 2406 2818 2 36 0 0% 0 0 1.013184
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.312241
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.775327
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.273175
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.834718
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.79077
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.282676
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.753121
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.065517
setivar (click) 2783 3726 3 46 0 0% 0 0 1.266169
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.402689
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.73926
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.4365
structaref (click) 4407 9095 3 88 0 0% 0 0 2.346367
structaset (click) 4113 5834 3 70 0 0% 0 0 1.776367
throw (click) 5953 4624 5 53 0 0% 0 0 1.758017

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.