Ruby Benchmarks

Details for Benchmarks at 2026-09-06 01:07:27 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.9% faster than CRuby 4.1.0dev
  • 8.5% faster than YJIT 3.4.7
On railsbench it is
  • 108.6% faster than CRuby 4.1.0dev
  • 13.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 91 5 97 50 202 50 218
chunky-png 5 32 5 32 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 450 50 618 50 677
liquid-compile 5 406 5 521 50 552 50 843
liquid-il 5 66 5 70 50 117 50 133
liquid-render 5 172 5 170 50 434 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 212 50 254 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 161 50 247 50 253
ruby-lsp 5 157 5 170 50 214 50 239
sequel 5 424 5 465 50 598 50 646
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 184 50 215
addressable-join 5 75 5 85 50 66 50 83
addressable-merge 5 160 5 165 50 221 50 244
addressable-new 5 352 5 356 50 518 50 540
addressable-normalize 5 52 5 59 50 60 50 72
addressable-parse 5 103 5 110 50 105 50 122
addressable-setters 5 184 5 195 50 233 50 260
addressable-to-s 5 164 5 176 50 183 50 213
binarytrees 5 82 5 90 50 136 50 169
blurhash 5 84 5 86 50 145 50 145
erubi 5 132 5 148 50 121 50 155
etanni 5 101 5 79 50 72 50 46
fannkuchredux 5 55 5 57 50 100 50 109
fluentd 5 60 5 75 50 20 50 40
gcbench 5 10 5 11 50 10 50 16
graphql 5 372 5 465 50 566 50 980
graphql-native 5 58 5 88 50 21 50 71
knucleotide 5 163 5 151 50 118 50 106
lee 5 23 5 33 50 10 50 22
matmul 5 53 5 51 50 87 50 98
nbody 5 250 5 265 50 663 50 683
nqueens 5 119 5 126 50 553 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 190 50 696 50 794
protoboeuf-encode 5 200 5 206 50 800 50 780
rack 5 439 5 462 50 720 50 741
ruby-json 5 84 5 112 50 50 50 87
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 222 50 250 50 270
string_malloc_pressure 5 146 5 32 50 101 50 10
sudoku 5 48 5 49 50 155 50 163
tinygql 5 41 5 45 50 36 50 56
30k_ifelse 5 28 5 29 50 187 50 184
30k_methods 5 38 5 40 50 457 50 455
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 157 5 194 50 1832 50 1913
cfunc_itself 5 344 5 354 50 1255 50 1258
fib 5 125 5 141 50 939 50 939
getivar 5 215 5 314 50 2278 50 2423
getivar-module 5 103 5 140 50 89 50 122
keyword_args 5 102 5 102 50 1238 50 1236
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 659 50 296 50 1566
object-new-initialize 5 169 5 269 50 259 50 1025
object-new-no-escape 5 80 5 152 50 89 50 542
respond_to 5 139 5 132 50 3904 50 3904
ruby-xor 5 247 5 257 50 1306 50 1300
send_bmethod 5 118 5 121 50 5539 50 4527
send_cfunc_block 5 107 5 112 50 305 50 306
send_rubyfunc_block 5 196 5 212 50 1371 50 1374
send_rubyfunc_inline 5 30 5 37 50 297 50 297
setivar 5 359 5 348 50 4928 50 4923
setivar_object 5 341 5 287 50 759 50 721
setivar_young 5 341 5 287 50 810 50 737
str_concat 5 392 5 423 50 1195 50 937
structaref 5 153 5 194 50 1795 50 1886
structaset 5 198 5 246 50 369 50 484
throw 5 1109 5 1306 50 1450 50 1566

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) 1555236 1349645 203 2615 0 0% 0 0 72.837675
chunky-png (click) 319720 279275 79 1378 1 0% 0 0 38.335296
erubi-rails (click) 1379503 1181103 268 3636 23 0% 0 0 94.013909
hexapdf (click) 1523938 1233692 593 15773 45 0% 0 0 426.923753
liquid-c (click) 558158 480962 113 2227 5 0% 0 0 62.307531
liquid-compile (click) 476748 420084 146 2677 2 0% 0 0 73.529791
liquid-il (click) 613908 519592 70 2731 0 0% 0 0 79.488593
liquid-render (click) 664438 612563 130 2949 8 0% 0 0 77.323947
lobsters (click) 8547141 7166543 3127 63562 125 0% 0 0 2035.146881
mail (click) 870530 826657 345 7750 40 0% 0 0 207.534248
psych-load (click) 286052 256859 60 836 2 0% 0 0 23.389404
railsbench (click) 3389346 3032039 1591 19815 105 0% 0 0 572.614744
rubocop (click) 5756677 4963294 3000 57127 132 0% 6 0 1623.470062
ruby-lsp (click) 1048841 949801 407 7460 46 0% 1 0 199.428802
sequel (click) 523731 466455 11 119 0 0% 0 0 4.093293
shipit (click) 6892339 5783516 3136 50383 147 0% 0 0 1601.634505
addressable-equality (click) 321618 274219 44 1382 1 0% 0 0 32.510368
addressable-getters (click) 284884 278232 26 863 0 0% 0 0 20.55816
addressable-join (click) 290321 286821 24 941 0 0% 0 0 23.184984
addressable-merge (click) 289442 246779 27 896 0 0% 0 0 21.311437
addressable-new (click) 262282 217576 21 564 0 0% 0 0 13.60994
addressable-normalize (click) 318967 263146 43 1328 1 0% 0 0 31.508335
addressable-parse (click) 287601 263723 26 880 0 0% 0 0 21.380945
addressable-setters (click) 264468 221992 20 582 0 0% 0 0 14.051471
addressable-to-s (click) 284492 268994 26 849 0 0% 0 0 20.371154
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.756566
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.936404
erubi (click) 245139 219746 6 135 0 0% 0 0 3.820611
etanni (click) 30039 31433 8 114 0 0% 0 0 3.410538
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.839567
fluentd (click) 513853 436168 7 116 0 0% 0 0 3.592683
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.408064
graphql (click) 414141 363902 74 1944 18 0% 0 0 52.750248
graphql-native (click) 357746 296739 39 532 0 0% 0 0 13.408119
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.721132
lee (click) 317224 262709 50 1107 0 0% 0 0 30.582986
matmul (click) 11076 4720 8 137 0 0% 0 0 4.121791
nbody (click) 14448 21176 6 251 0 0% 0 0 6.144081
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.17122
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 106.632874
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.509674
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.434805
rack (click) 283771 195490 35 581 0 0% 0 0 15.26731
ruby-json (click) 20081 18131 8 211 0 0% 0 0 5.868196
rubyboy (click) 667849 646229 154 6525 42 0% 0 0 163.158507
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.716992
splay (click) 34536 22516 9 175 0 0% 0 0 5.228054
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.735072
sudoku (click) 51585 74062 7 873 0 0% 0 0 23.026849
tinygql (click) 300772 257100 59 1041 5 0% 0 0 26.77446
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1865.054127
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 476.518034
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4997.449579
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090827
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.513913
fib (click) 2659 2995 3 30 0 0% 0 0 1.119138
getivar (click) 3789 6778 3 79 0 0% 0 0 1.894684
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.316199
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.827367
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.868157
object-new (click) 2352 2825 2 38 0 0% 0 0 1.004178
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.281589
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.748559
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.117033
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.780534
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.766196
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.30225
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.780941
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.047999
setivar (click) 2783 3726 3 46 0 0% 0 0 1.255212
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408176
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.711794
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.455487
structaref (click) 4407 9095 3 88 0 0% 0 0 2.355671
structaset (click) 4113 5834 3 70 0 0% 0 0 1.771783
throw (click) 5953 4624 5 53 0 0% 0 0 1.740438

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.