Ruby Benchmarks

Details for Benchmarks at 2026-09-01 01:12:42 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.6% faster than CRuby 4.1.0dev
  • 7.5% faster than YJIT 3.4.7
On railsbench it is
  • 113.2% faster than CRuby 4.1.0dev
  • 14.5% 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 92 5 95 50 201 50 214
chunky-png 5 32 5 33 50 33 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 447 50 622 50 680
liquid-compile 5 418 5 522 50 582 50 845
liquid-il 5 67 5 70 50 117 50 130
liquid-render 5 173 5 171 50 432 50 471
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 212 50 253 50 293
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 162 50 246 50 254
ruby-lsp 5 163 5 163 50 239 50 238
sequel 5 427 5 461 50 594 50 642
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 176 50 183 50 211
addressable-join 5 73 5 84 50 66 50 83
addressable-merge 5 161 5 164 50 223 50 241
addressable-new 5 353 5 354 50 519 50 544
addressable-normalize 5 52 5 58 50 60 50 72
addressable-parse 5 104 5 109 50 104 50 121
addressable-setters 5 185 5 194 50 233 50 260
addressable-to-s 5 165 5 175 50 183 50 212
binarytrees 5 82 5 91 50 136 50 170
blurhash 5 84 5 87 50 145 50 145
erubi 5 133 5 148 50 136 50 153
etanni 5 100 5 78 50 73 50 46
fannkuchredux 5 55 5 56 50 101 50 112
fluentd 5 63 5 71 50 20 50 33
gcbench 5 10 5 11 50 10 50 17
graphql 5 373 5 469 50 531 50 988
graphql-native 5 58 5 88 50 21 50 70
knucleotide 5 163 5 150 50 117 50 104
lee 5 23 5 33 50 10 50 22
matmul 5 53 5 54 50 88 50 99
nbody 5 250 5 271 50 663 50 691
nqueens 5 119 5 127 50 554 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 187 50 696 50 811
protoboeuf-encode 5 200 5 205 50 793 50 780
rack 5 444 5 459 50 711 50 738
ruby-json 5 84 5 113 50 51 50 89
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 224 50 250 50 277
string_malloc_pressure 5 146 5 32 50 101 50 10
sudoku 5 48 5 49 50 155 50 174
tinygql 5 40 5 45 50 39 50 56
30k_ifelse 5 28 5 29 50 184 50 184
30k_methods 5 38 5 39 50 456 50 456
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 156 5 194 50 1834 50 1895
cfunc_itself 5 348 5 347 50 1255 50 1251
fib 5 125 5 138 50 939 50 939
getivar 5 215 5 308 50 2306 50 2420
getivar-module 5 103 5 135 50 89 50 116
keyword_args 5 102 5 93 50 1240 50 1243
loops-times 5 23 5 27 50 63 50 62
object-new 5 268 5 665 50 296 50 1581
object-new-initialize 5 169 5 275 50 260 50 1026
object-new-no-escape 5 80 5 152 50 89 50 542
respond_to 5 139 5 132 50 3905 50 3896
ruby-xor 5 247 5 260 50 1305 50 1297
send_bmethod 5 118 5 122 50 5539 50 4526
send_cfunc_block 5 107 5 113 50 305 50 287
send_rubyfunc_block 5 196 5 213 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 297
setivar 5 359 5 349 50 4931 50 4924
setivar_object 5 233 5 287 50 762 50 785
setivar_young 5 342 5 287 50 809 50 810
str_concat 5 391 5 411 50 1197 50 925
structaref 5 153 5 191 50 1799 50 1887
structaset 5 198 5 268 50 369 50 505
throw 5 1109 5 1446 50 1440 50 1877

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) 1553279 1380074 203 2613 0 0% 0 0 72.665586
chunky-png (click) 321666 281392 79 1378 1 0% 0 0 38.066164
erubi-rails (click) 1376162 1209579 268 3636 23 0% 0 0 94.683625
hexapdf (click) 1521038 1321022 593 15772 45 0% 0 0 425.203734
liquid-c (click) 558199 489183 113 2227 5 0% 0 0 62.519533
liquid-compile (click) 473980 368115 146 2677 2 0% 0 0 73.620012
liquid-il (click) 612946 526030 70 2733 0 0% 0 0 79.506941
liquid-render (click) 667682 592085 130 2949 8 0% 0 0 77.166467
lobsters (click) 8535321 7221068 3126 63488 124 0% 0 0 2030.732383
mail (click) 867594 872071 345 7750 40 0% 0 0 208.98886
psych-load (click) 286345 248983 60 836 2 0% 0 0 23.379643
railsbench (click) 3387634 2981158 1591 19815 105 0% 0 0 537.775432
rubocop (click) 5753188 4950974 3000 57125 133 0% 6 0 1619.629693
ruby-lsp (click) 1047866 915492 408 7486 47 0% 1 0 201.58261
sequel (click) 523736 466455 11 119 0 0% 0 0 4.015293
shipit (click) 7051374 5903352 3130 50432 147 0% 0 0 1610.220068
addressable-equality (click) 324579 310774 44 1382 1 0% 0 0 33.487065
addressable-getters (click) 280139 264183 26 863 0 0% 0 0 20.450036
addressable-join (click) 290321 286821 24 941 0 0% 0 0 22.951665
addressable-merge (click) 290407 289375 27 896 0 0% 0 0 21.864609
addressable-new (click) 265243 254131 21 564 0 0% 0 0 13.973821
addressable-normalize (click) 319932 313934 43 1328 1 0% 0 0 31.779703
addressable-parse (click) 284685 243581 26 880 0 0% 0 0 20.963804
addressable-setters (click) 246156 192359 20 582 0 0% 0 0 14.228212
addressable-to-s (click) 281581 257049 26 849 0 0% 0 0 20.1546
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.7806
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.825264
erubi (click) 245427 220062 6 135 0 0% 0 0 3.899682
etanni (click) 29494 22579 8 114 0 0% 0 0 3.429006
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.865854
fluentd (click) 512888 475432 7 116 0 0% 0 0 3.663263
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.439268
graphql (click) 410659 351780 74 1944 18 0% 0 0 52.965561
graphql-native (click) 354681 293626 39 532 0 0% 0 0 13.558003
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.686686
lee (click) 314745 268231 50 1107 0 0% 0 0 30.7799
matmul (click) 11076 4720 8 137 0 0% 0 0 4.137204
nbody (click) 14448 21176 6 251 0 0% 0 0 6.135615
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.187105
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.129716
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.828563
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.559016
rack (click) 281004 258261 35 581 0 0% 0 0 15.245534
ruby-json (click) 19495 17440 8 211 0 0% 0 0 5.937723
rubyboy (click) 665903 627708 154 6525 42 0% 0 0 163.606956
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.842623
splay (click) 34536 22516 9 175 0 0% 0 0 5.210064
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.756979
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.89
tinygql (click) 297995 254298 59 1041 5 0% 0 0 26.705217
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1875.736597
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 477.782082
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4993.862875
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.093926
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.527782
fib (click) 2659 2995 3 30 0 0% 0 0 1.124859
getivar (click) 3789 6778 3 79 0 0% 0 0 1.921869
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.32423
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.820707
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.903848
object-new (click) 2352 2825 2 38 0 0% 0 0 1.006474
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.284105
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.760263
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.086484
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.816785
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.807576
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.328156
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.77014
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.053273
setivar (click) 2783 3726 3 46 0 0% 0 0 1.274767
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.402431
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.682322
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.455722
structaref (click) 4407 9095 3 88 0 0% 0 0 2.370733
structaset (click) 4113 5834 3 70 0 0% 0 0 1.765071
throw (click) 5953 4624 5 53 0 0% 0 0 1.788362

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.