Ruby Benchmarks

Details for Benchmarks at 2026-09-08 01:02:48 UTC

YJIT metrics from the ruby-bench suite using Ruby b6ed8bb1be.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.3% faster than CRuby 4.1.0dev
  • 7.3% faster than YJIT 3.4.7
On railsbench it is
  • 111.0% faster than CRuby 4.1.0dev
  • 15.6% 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 93 5 95 50 203 50 218
chunky-png 5 32 5 33 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 448 50 622 50 673
liquid-compile 5 418 5 521 50 577 50 844
liquid-il 5 66 5 69 50 116 50 130
liquid-render 5 169 5 176 50 436 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 212 50 253 50 290
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 162 50 247 50 253
ruby-lsp 5 157 5 166 50 240 50 229
sequel 5 427 5 460 50 596 50 644
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 177 50 184 50 214
addressable-join 5 75 5 86 50 66 50 86
addressable-merge 5 161 5 164 50 222 50 249
addressable-new 5 353 5 361 50 519 50 552
addressable-normalize 5 53 5 58 50 60 50 72
addressable-parse 5 104 5 110 50 104 50 123
addressable-setters 5 184 5 196 50 233 50 265
addressable-to-s 5 164 5 175 50 181 50 214
binarytrees 5 82 5 91 50 136 50 170
blurhash 5 84 5 87 50 145 50 144
erubi 5 136 5 149 50 125 50 154
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 57 50 101 50 108
fluentd 5 61 5 63 50 21 50 39
gcbench 5 10 5 11 50 10 50 16
graphql 5 373 5 476 50 574 50 989
graphql-native 5 59 5 87 50 22 50 68
knucleotide 5 164 5 151 50 117 50 104
lee 5 23 5 33 50 10 50 20
matmul 5 53 5 52 50 87 50 97
nbody 5 250 5 261 50 663 50 670
nqueens 5 119 5 126 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 186 50 696 50 835
protoboeuf-encode 5 197 5 206 50 796 50 805
rack 5 447 5 454 50 716 50 738
ruby-json 5 83 5 111 50 51 50 88
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 221 50 247 50 275
string_malloc_pressure 5 146 5 32 50 103 50 10
sudoku 5 48 5 49 50 155 50 164
tinygql 5 42 5 45 50 40 50 56
30k_ifelse 5 28 5 29 50 185 50 185
30k_methods 5 38 5 39 50 455 50 458
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 157 5 207 50 1834 50 1931
cfunc_itself 5 338 5 352 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 216 5 321 50 2314 50 2428
getivar-module 5 103 5 141 50 89 50 122
keyword_args 5 102 5 108 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 28
object-new 5 268 5 664 50 298 50 1559
object-new-initialize 5 169 5 272 50 259 50 1022
object-new-no-escape 5 81 5 153 50 89 50 541
respond_to 5 139 5 128 50 3905 50 3903
ruby-xor 5 247 5 254 50 1306 50 1314
send_bmethod 5 118 5 122 50 5540 50 4527
send_cfunc_block 5 106 5 105 50 306 50 281
send_rubyfunc_block 5 196 5 208 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 298
setivar 5 359 5 349 50 4930 50 4923
setivar_object 5 341 5 287 50 763 50 789
setivar_young 5 342 5 287 50 810 50 822
str_concat 5 391 5 431 50 1195 50 950
structaref 5 153 5 193 50 1799 50 1884
structaset 5 199 5 268 50 371 50 503
throw 5 1111 5 1402 50 1442 50 1869

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) 1578869 1287128 204 2669 0 0% 0 0 78.439696
chunky-png (click) 331819 286096 79 1378 1 0% 0 0 38.208644
erubi-rails (click) 1395542 1209824 268 3636 23 0% 0 0 93.385873
hexapdf (click) 1534722 1346167 593 15774 45 0% 0 0 424.948107
liquid-c (click) 553417 516916 113 2227 5 0% 0 0 62.458939
liquid-compile (click) 469978 412890 146 2677 2 0% 0 0 73.215676
liquid-il (click) 622207 547025 70 2734 0 0% 0 0 80.345622
liquid-render (click) 675375 627302 130 2949 8 0% 0 0 77.065887
lobsters (click) 8556845 7148638 3125 63536 125 0% 0 0 2028.788695
mail (click) 880967 815572 345 7750 40 0% 0 0 208.134051
psych-load (click) 297088 254675 60 836 2 0% 0 0 23.337912
railsbench (click) 3403417 2960070 1591 19816 105 0% 0 0 571.643544
rubocop (click) 5768825 4987769 3000 57133 134 0% 6 0 1621.550327
ruby-lsp (click) 1059029 913694 408 7484 47 0% 1 0 200.247141
sequel (click) 533460 511800 11 119 0 0% 0 0 4.203256
shipit (click) 7109464 6057319 3125 50357 147 0% 0 0 1602.813132
addressable-equality (click) 333481 305498 44 1382 1 0% 0 0 33.519896
addressable-getters (click) 277796 261341 26 863 0 0% 0 0 20.391955
addressable-join (click) 279938 250290 24 941 0 0% 0 0 22.889417
addressable-merge (click) 299309 275907 27 896 0 0% 0 0 21.709784
addressable-new (click) 258150 237235 21 564 0 0% 0 0 13.731912
addressable-normalize (click) 328834 316870 43 1328 1 0% 0 0 31.859847
addressable-parse (click) 292715 237495 26 880 0 0% 0 0 21.04493
addressable-setters (click) 274335 242928 20 582 0 0% 0 0 14.349285
addressable-to-s (click) 277678 252168 26 849 0 0% 0 0 20.070554
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.759907
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.802458
erubi (click) 255580 224746 6 135 0 0% 0 0 3.908032
etanni (click) 29821 22968 8 114 0 0% 0 0 3.403346
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.788052
fluentd (click) 526758 493984 7 116 0 0% 0 0 3.663459
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.428571
graphql (click) 410226 351499 74 1944 18 0% 0 0 53.148258
graphql-native (click) 353543 292212 39 532 0 0% 0 0 13.670602
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.65925
lee (click) 327891 284160 50 1107 0 0% 0 0 30.342993
matmul (click) 11076 4720 8 137 0 0% 0 0 4.111828
nbody (click) 14448 21176 6 251 0 0% 0 0 6.164711
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.292753
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 106.698306
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.552508
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.185871
rack (click) 278861 255424 35 581 0 0% 0 0 14.916704
ruby-json (click) 19822 17829 8 211 0 0% 0 0 5.810283
rubyboy (click) 676738 658801 154 6525 42 0% 0 0 163.120741
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.502639
splay (click) 34536 22516 9 175 0 0% 0 0 5.196979
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.719413
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.846097
tinygql (click) 309467 259808 59 1041 5 0% 0 0 26.669223
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1862.647222
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 476.466995
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4965.266107
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.064643
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.486688
fib (click) 2659 2995 3 30 0 0% 0 0 1.080266
getivar (click) 3789 6778 3 79 0 0% 0 0 1.930167
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.328496
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.802349
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.900404
object-new (click) 2352 2825 2 38 0 0% 0 0 0.986167
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.31876
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.765833
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.13792
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.818018
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.807375
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.291625
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.711611
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.027981
setivar (click) 2783 3726 3 46 0 0% 0 0 1.242528
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406678
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.734438
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.405067
structaref (click) 4407 9095 3 88 0 0% 0 0 2.333029
structaset (click) 4113 5834 3 70 0 0% 0 0 1.770658
throw (click) 5953 4624 5 53 0 0% 0 0 1.77674

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.