Ruby Benchmarks

Details for Benchmarks at 2026-06-28 01:25:05 UTC

YJIT metrics from the ruby-bench suite using Ruby 4323e4f2e8.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.6% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
On railsbench it is
  • 124.1% faster than CRuby 4.1.0dev
  • 19.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 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 197 50 240
chunky-png 5 32 5 30 50 33 50 25
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 441 50 616 50 676
liquid-compile 5 419 5 513 50 581 50 847
liquid-render 5 171 5 176 50 432 50 467
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 208 50 253 50 302
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 155 50 246 50 251
ruby-lsp 5 162 5 161 50 240 50 224
sequel 5 419 5 461 50 589 50 664
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 18
addressable-getters 5 165 5 170 50 183 50 208
addressable-join 5 74 5 84 50 64 50 83
addressable-merge 5 162 5 158 50 222 50 241
addressable-new 5 352 5 342 50 517 50 540
addressable-normalize 5 53 5 59 50 60 50 71
addressable-parse 5 104 5 105 50 105 50 118
addressable-setters 5 185 5 185 50 233 50 253
addressable-to-s 5 165 5 170 50 183 50 206
binarytrees 5 82 5 87 50 136 50 143
blurhash 5 84 5 83 50 145 50 144
erubi 5 141 5 150 50 138 50 149
etanni 5 100 5 81 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 104
fluentd 5 62 5 59 50 22 50 27
gcbench 5 10 5 10 50 10 50 16
graphql 5 367 5 468 50 569 50 963
graphql-native 5 57 5 89 50 23 50 69
knucleotide 5 163 5 144 50 117 50 98
lee 5 23 5 29 50 10 50 16
matmul 5 53 5 54 50 88 50 96
nbody 5 250 5 245 50 663 50 674
nqueens 5 119 5 129 50 554 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 698 50 788
protoboeuf-encode 5 201 5 192 50 800 50 794
rack 5 441 5 467 50 713 50 805
ruby-json 5 84 5 113 50 50 50 90
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 200 50 250 50 237
sudoku 5 48 5 50 50 155 50 157
tinygql 5 41 5 44 50 40 50 54
30k_ifelse 5 28 5 28 50 171 50 185
30k_methods 5 38 5 39 50 456 50 456
attr_accessor 5 156 5 180 50 1834 50 1884
cfunc_itself 5 348 5 309 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 215 5 334 50 2314 50 2442
getivar-module 5 103 5 138 50 89 50 284
keyword_args 5 102 5 103 50 1240 50 471
loops-times 5 23 5 26 50 63 50 59
object-new 5 236 5 472 50 298 50 1448
object-new-initialize 5 169 5 234 50 260 50 987
object-new-no-escape 5 80 5 139 50 89 50 504
respond_to 5 139 5 126 50 3899 50 3902
ruby-xor 5 247 5 234 50 1306 50 1313
send_bmethod 5 118 5 108 50 5538 50 4526
send_cfunc_block 5 107 5 106 50 305 50 315
send_rubyfunc_block 5 195 5 196 50 1372 50 1375
setivar 5 359 5 378 50 4929 50 4958
setivar_object 5 341 5 296 50 273 50 596
setivar_young 5 341 5 295 50 807 50 601
str_concat 5 391 5 430 50 1202 50 1037
structaref 5 153 5 186 50 1801 50 1872
structaset 5 198 5 216 50 372 50 487
throw 5 1108 5 1380 50 1441 50 1777

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) 1565337 1272211 203 2666 0 0% 0 0 75.03414
chunky-png (click) 323904 298369 79 1376 1 0% 0 0 38.242589
erubi-rails (click) 1386140 1199077 268 3626 23 0% 0 0 94.571924
hexapdf (click) 1535244 1298528 593 15767 44 0% 0 0 426.601555
liquid-c (click) 568228 529775 114 2240 5 0% 0 0 59.103032
liquid-compile (click) 481140 462869 146 2669 2 0% 0 0 73.916542
liquid-render (click) 674595 669573 131 2963 8 0% 0 0 77.958123
lobsters (click) 8555960 7139625 3124 63467 122 0% 0 0 2038.281728
mail (click) 875054 851408 345 7739 40 0% 0 0 209.565482
psych-load (click) 293257 245644 61 829 2 0% 0 0 23.546799
railsbench (click) 3359364 2788912 1592 19742 105 0% 0 0 535.444681
rubocop (click) 5804458 5081738 3002 57352 127 0% 6 0 1650.474018
ruby-lsp (click) 1053802 902114 409 7470 47 0% 1 0 201.559693
sequel (click) 511960 431787 11 119 0 0% 0 0 4.404331
shipit (click) 6878269 5788314 3134 49911 147 0% 0 0 1616.747807
addressable-equality (click) 323960 291730 44 1381 1 0% 0 0 33.590832
addressable-getters (click) 284244 242840 26 863 0 0% 0 0 20.416303
addressable-join (click) 291779 237302 24 941 0 0% 0 0 23.56075
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.664055
addressable-new (click) 266639 229176 21 563 0 0% 0 0 13.725686
addressable-normalize (click) 321355 280787 43 1327 1 0% 0 0 31.727829
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 21.286095
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 14.28873
addressable-to-s (click) 285888 260434 26 849 0 0% 0 0 20.284085
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.751215
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.768162
erubi (click) 250570 191320 6 134 0 0% 0 0 3.834271
etanni (click) 32989 26478 8 114 0 0% 0 0 3.432403
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.796511
fluentd (click) 517903 454270 7 116 0 0% 0 0 3.590567
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.344042
graphql (click) 418858 383211 74 1940 19 0% 0 0 52.8735
graphql-native (click) 359894 321776 39 532 0 0% 0 0 13.517663
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.637053
lee (click) 322939 299824 50 1102 0 0% 0 0 30.678814
matmul (click) 11103 4709 8 136 0 0% 0 0 4.065969
nbody (click) 14448 21176 6 251 0 0% 0 0 6.134106
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.258254
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.255334
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.360041
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.960939
rack (click) 286788 205720 35 581 0 0% 0 0 14.694039
ruby-json (click) 19462 17420 8 206 0 0% 0 0 5.924542
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 163.215831
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.987299
splay (click) 34617 22483 9 175 0 0% 0 0 5.338216
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.879602
tinygql (click) 305123 267690 59 1026 5 0% 0 0 26.539529
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1873.253183
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.785073
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.093031
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498462
fib (click) 2659 2995 3 30 0 0% 0 0 1.129099
getivar (click) 3789 6778 3 79 0 0% 0 0 1.942716
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334928
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.816821
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.918704
object-new (click) 2406 2818 2 36 0 0% 0 0 1.017032
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.296157
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.792899
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.090977
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.816928
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.813971
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.245935
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.731145
setivar (click) 2783 3726 3 46 0 0% 0 0 1.253934
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.402796
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.702312
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.479388
structaref (click) 4407 9095 3 88 0 0% 0 0 2.353242
structaset (click) 4113 5834 3 70 0 0% 0 0 1.78246
throw (click) 5953 4624 5 53 0 0% 0 0 1.765891

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.