Ruby Benchmarks

Details for Benchmarks at 2026-09-03 01:03:27 UTC

YJIT metrics from the ruby-bench suite using Ruby 1d8d84b3d6.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.1% faster than CRuby 4.1.0dev
  • 7.4% faster than YJIT 3.4.7
On railsbench it is
  • 113.9% faster than CRuby 4.1.0dev
  • 14.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 14 minutes
aarch64 runtime: 7 hours, 53 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 97 50 194 50 210
chunky-png 5 31 5 32 50 34 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 449 50 621 50 679
liquid-compile 5 422 5 523 50 582 50 842
liquid-il 5 67 5 70 50 117 50 132
liquid-render 5 170 5 172 50 433 50 473
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 254 50 295
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 161 50 249 50 251
ruby-lsp 5 163 5 166 50 240 50 240
sequel 5 422 5 457 50 601 50 638
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 18
addressable-getters 5 165 5 176 50 184 50 214
addressable-join 5 75 5 84 50 65 50 83
addressable-merge 5 161 5 163 50 223 50 240
addressable-new 5 353 5 355 50 509 50 550
addressable-normalize 5 52 5 59 50 60 50 71
addressable-parse 5 104 5 109 50 104 50 120
addressable-setters 5 184 5 195 50 234 50 257
addressable-to-s 5 164 5 175 50 183 50 211
binarytrees 5 81 5 90 50 136 50 168
blurhash 5 84 5 84 50 145 50 145
erubi 5 139 5 154 50 138 50 155
etanni 5 101 5 81 50 73 50 48
fannkuchredux 5 55 5 56 50 101 50 112
fluentd 5 61 5 73 50 21 50 30
gcbench 5 10 5 11 50 10 50 16
graphql 5 372 5 485 50 568 50 991
graphql-native 5 58 5 89 50 21 50 71
knucleotide 5 163 5 154 50 118 50 108
lee 5 22 5 33 50 10 50 22
matmul 5 53 5 52 50 87 50 99
nbody 5 250 5 267 50 661 50 681
nqueens 5 119 5 127 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 189 50 696 50 794
protoboeuf-encode 5 200 5 203 50 799 50 780
rack 5 438 5 461 50 713 50 738
ruby-json 5 84 5 113 50 51 50 87
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 227 50 246 50 269
string_malloc_pressure 5 146 5 32 50 104 50 10
sudoku 5 48 5 50 50 155 50 175
tinygql 5 42 5 45 50 40 50 57
30k_ifelse 5 28 5 28 50 186 50 186
30k_methods 5 38 5 39 50 458 50 457
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 157 5 209 50 1833 50 1937
cfunc_itself 5 348 5 351 50 1255 50 1258
fib 5 125 5 136 50 940 50 939
getivar 5 211 5 340 50 2307 50 2440
getivar-module 5 103 5 146 50 89 50 122
keyword_args 5 102 5 105 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 664 50 297 50 1566
object-new-initialize 5 169 5 273 50 260 50 1017
object-new-no-escape 5 80 5 153 50 89 50 546
respond_to 5 139 5 131 50 3903 50 3912
ruby-xor 5 247 5 244 50 1306 50 1301
send_bmethod 5 118 5 121 50 5539 50 4527
send_cfunc_block 5 107 5 106 50 305 50 308
send_rubyfunc_block 5 196 5 202 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 298 50 298
setivar 5 359 5 349 50 4930 50 4923
setivar_object 5 341 5 287 50 762 50 706
setivar_young 5 341 5 287 50 808 50 739
str_concat 5 391 5 419 50 1195 50 945
structaref 5 151 5 197 50 1801 50 1892
structaset 5 198 5 267 50 371 50 498
throw 5 1111 5 1299 50 1446 50 1718

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) 1562340 1371670 204 2680 0 0% 0 0 74.791035
chunky-png (click) 321666 281392 79 1378 1 0% 0 0 38.3968
erubi-rails (click) 1377328 1185914 268 3636 23 0% 0 0 94.547808
hexapdf (click) 1524113 1315928 593 15772 45 0% 0 0 424.383531
liquid-c (click) 558492 514075 113 2227 5 0% 0 0 61.8152
liquid-compile (click) 476762 420152 146 2677 2 0% 0 0 73.114746
liquid-il (click) 613221 526165 70 2734 0 0% 0 0 80.010964
liquid-render (click) 666712 582277 130 2949 8 0% 0 0 77.14728
lobsters (click) 8539305 7199636 3125 63496 125 0% 0 0 2021.742599
mail (click) 870510 834817 345 7750 40 0% 0 0 206.250424
psych-load (click) 286345 248983 60 836 2 0% 0 0 23.37455
railsbench (click) 3388950 2998978 1591 19815 105 0% 0 0 534.25975
rubocop (click) 5756686 4955111 3000 57125 133 0% 6 0 1610.659429
ruby-lsp (click) 1047899 898964 408 7486 47 0% 1 0 197.652112
sequel (click) 523736 474679 11 119 0 0% 0 0 4.41816
shipit (click) 6897450 5794926 3136 50500 147 0% 0 0 1595.383525
addressable-equality (click) 320398 297422 44 1382 1 0% 0 0 32.358951
addressable-getters (click) 281680 249587 26 863 0 0% 0 0 20.194127
addressable-join (click) 289356 260609 24 941 0 0% 0 0 22.664896
addressable-merge (click) 290407 289375 27 896 0 0% 0 0 21.602624
addressable-new (click) 264275 244298 21 564 0 0% 0 0 13.542007
addressable-normalize (click) 318967 263146 43 1328 1 0% 0 0 31.453005
addressable-parse (click) 284392 251457 26 880 0 0% 0 0 20.759594
addressable-setters (click) 264470 221992 20 582 0 0% 0 0 13.919618
addressable-to-s (click) 283527 242782 26 849 0 0% 0 0 20.103527
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.745886
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.776944
erubi (click) 243188 217649 6 135 0 0% 0 0 3.860266
etanni (click) 29494 22579 8 114 0 0% 0 0 3.422497
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.790439
fluentd (click) 512888 467307 7 116 0 0% 0 0 3.660828
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.44298
graphql (click) 415399 382238 74 1944 18 0% 0 0 52.402564
graphql-native (click) 357658 329418 39 532 0 0% 0 0 13.526445
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.631797
lee (click) 317512 279220 50 1107 0 0% 0 0 30.645764
matmul (click) 11076 4720 8 137 0 0% 0 0 4.118282
nbody (click) 14448 21176 6 251 0 0% 0 0 6.099368
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.21625
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.475172
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.575723
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.335457
rack (click) 281825 234313 35 581 0 0% 0 0 15.208802
ruby-json (click) 20040 18102 8 211 0 0% 0 0 5.905934
rubyboy (click) 666196 611640 154 6525 42 0% 0 0 161.2521
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.280398
splay (click) 34536 22516 9 175 0 0% 0 0 5.15158
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.745448
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.780619
tinygql (click) 301065 257416 59 1041 5 0% 0 0 26.682576
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1862.751579
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 474.750851
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4981.599936
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.059936
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.506129
fib (click) 2659 2995 3 30 0 0% 0 0 1.132731
getivar (click) 3789 6778 3 79 0 0% 0 0 1.907924
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.310553
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.804127
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.87223
object-new (click) 2352 2825 2 38 0 0% 0 0 1.003387
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.302366
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.771038
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.123417
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.787585
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.80747
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.306751
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.763771
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.078255
setivar (click) 2783 3726 3 46 0 0% 0 0 1.243622
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.417234
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.723807
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.413032
structaref (click) 4407 9095 3 88 0 0% 0 0 2.350865
structaset (click) 4113 5834 3 70 0 0% 0 0 1.759847
throw (click) 5953 4624 5 53 0 0% 0 0 1.773538

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.