Ruby Benchmarks

Details for Benchmarks at 2026-09-04 01:00:19 UTC

YJIT metrics from the ruby-bench suite using Ruby 07ef97df22.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.5% faster than CRuby 4.1.0dev
  • 8.5% faster than YJIT 3.4.7
On railsbench it is
  • 115.3% faster than CRuby 4.1.0dev
  • 18.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 92 5 94 50 202 50 224
chunky-png 5 31 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 421 5 445 50 620 50 677
liquid-compile 5 420 5 525 50 580 50 845
liquid-il 5 67 5 70 50 116 50 134
liquid-render 5 172 5 173 50 432 50 467
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 213 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 162 50 247 50 257
ruby-lsp 5 163 5 163 50 227 50 233
sequel 5 428 5 455 50 599 50 639
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 212
addressable-join 5 75 5 84 50 66 50 83
addressable-merge 5 161 5 163 50 222 50 243
addressable-new 5 353 5 352 50 518 50 547
addressable-normalize 5 52 5 58 50 60 50 72
addressable-parse 5 104 5 109 50 105 50 123
addressable-setters 5 184 5 193 50 235 50 259
addressable-to-s 5 164 5 175 50 182 50 212
binarytrees 5 82 5 90 50 136 50 170
blurhash 5 83 5 84 50 145 50 145
erubi 5 138 5 149 50 142 50 155
etanni 5 100 5 80 50 70 50 47
fannkuchredux 5 55 5 57 50 100 50 109
fluentd 5 62 5 66 50 29 50 32
gcbench 5 10 5 11 50 10 50 16
graphql 5 360 5 472 50 567 50 984
graphql-native 5 58 5 89 50 22 50 69
knucleotide 5 163 5 153 50 117 50 107
lee 5 23 5 33 50 10 50 22
matmul 5 53 5 52 50 87 50 99
nbody 5 250 5 266 50 663 50 682
nqueens 5 119 5 128 50 554 50 596
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 188 50 696 50 780
protoboeuf-encode 5 197 5 206 50 793 50 797
rack 5 448 5 458 50 714 50 750
ruby-json 5 84 5 111 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 222 50 250 50 271
string_malloc_pressure 5 148 5 32 50 101 50 10
sudoku 5 48 5 49 50 155 50 175
tinygql 5 41 5 45 50 40 50 56
30k_ifelse 5 28 5 29 50 187 50 185
30k_methods 5 38 5 40 50 458 50 458
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 157 5 193 50 1832 50 1916
cfunc_itself 5 347 5 366 50 1255 50 1258
fib 5 125 5 141 50 939 50 939
getivar 5 210 5 336 50 2306 50 2439
getivar-module 5 103 5 136 50 89 50 119
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 662 50 297 50 1565
object-new-initialize 5 168 5 269 50 259 50 1010
object-new-no-escape 5 80 5 153 50 89 50 541
respond_to 5 139 5 132 50 3903 50 3911
ruby-xor 5 247 5 256 50 1306 50 1302
send_bmethod 5 118 5 122 50 5539 50 4527
send_cfunc_block 5 106 5 107 50 302 50 303
send_rubyfunc_block 5 196 5 202 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 298
setivar 5 359 5 348 50 4931 50 4922
setivar_object 5 341 5 286 50 761 50 712
setivar_young 5 342 5 286 50 810 50 741
str_concat 5 390 5 427 50 1195 50 952
structaref 5 153 5 189 50 1800 50 1877
structaset 5 198 5 273 50 369 50 495
throw 5 1108 5 1295 50 1445 50 1699

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) 1555739 1424584 203 2610 0 0% 0 0 76.279878
chunky-png (click) 320406 288875 79 1378 1 0% 0 0 38.198856
erubi-rails (click) 1379567 1189482 268 3636 23 0% 0 0 94.321892
hexapdf (click) 1525196 1252048 593 15773 45 0% 0 0 422.042919
liquid-c (click) 561403 501444 113 2227 5 0% 0 0 61.981803
liquid-compile (click) 476065 378979 146 2677 2 0% 0 0 73.633549
liquid-il (click) 612366 509405 70 2734 0 0% 0 0 79.577893
liquid-render (click) 667682 600277 130 2949 8 0% 0 0 76.853343
lobsters (click) 8538118 7134456 3125 63492 125 0% 0 0 2020.930774
mail (click) 868305 783395 345 7750 40 0% 0 0 206.59811
psych-load (click) 287310 234235 60 836 2 0% 0 0 23.430064
railsbench (click) 3390058 2959791 1591 19816 105 0% 0 0 532.686897
rubocop (click) 5756017 4954775 3000 57125 133 0% 6 0 1611.459698
ruby-lsp (click) 1048836 957881 408 7486 47 0% 1 0 198.677356
sequel (click) 523736 466455 11 119 0 0% 0 0 4.183219
shipit (click) 6877770 5769216 3136 50326 147 0% 0 0 1607.982172
addressable-equality (click) 322628 292268 44 1382 1 0% 0 0 33.070284
addressable-getters (click) 284884 278232 26 863 0 0% 0 0 20.670537
addressable-join (click) 290321 286821 24 941 0 0% 0 0 22.804157
addressable-merge (click) 290407 289375 27 896 0 0% 0 0 21.464839
addressable-new (click) 265243 254131 21 564 0 0% 0 0 13.931389
addressable-normalize (click) 319932 313934 43 1328 1 0% 0 0 31.666075
addressable-parse (click) 268617 240962 26 880 0 0% 0 0 20.736598
addressable-setters (click) 263482 237890 20 582 0 0% 0 0 14.149804
addressable-to-s (click) 284492 268994 26 849 0 0% 0 0 20.221788
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.706527
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.753187
erubi (click) 246397 221703 6 135 0 0% 0 0 3.913023
etanni (click) 30080 23270 8 114 0 0% 0 0 3.41728
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.818484
fluentd (click) 513853 436236 7 116 0 0% 0 0 3.558261
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.423549
graphql (click) 415399 382238 74 1944 18 0% 0 0 52.644214
graphql-native (click) 358623 314650 39 532 0 0% 0 0 13.533956
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.740072
lee (click) 316543 262355 50 1107 0 0% 0 0 30.435888
matmul (click) 11076 4720 8 137 0 0% 0 0 4.135806
nbody (click) 14448 21176 6 251 0 0% 0 0 6.119159
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.179558
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 106.336315
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.141376
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.176268
rack (click) 266055 223805 35 581 0 0% 0 0 14.893905
ruby-json (click) 20081 18131 8 211 0 0% 0 0 5.812809
rubyboy (click) 669107 639969 154 6525 42 0% 0 0 162.339812
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.247496
splay (click) 34536 22516 9 175 0 0% 0 0 5.181201
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.735786
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.872172
tinygql (click) 302030 242668 59 1041 5 0% 0 0 26.639241
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1856.463032
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 473.724864
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4975.082025
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.106256
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.474161
fib (click) 2659 2995 3 30 0 0% 0 0 1.121452
getivar (click) 3789 6778 3 79 0 0% 0 0 1.907746
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.260374
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.804926
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.91129
object-new (click) 2352 2825 2 38 0 0% 0 0 1.00214
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.285466
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.747533
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.127433
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.760843
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.807825
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.301954
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.747875
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.069717
setivar (click) 2783 3726 3 46 0 0% 0 0 1.225067
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.39512
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.726999
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.483542
structaref (click) 4407 9095 3 88 0 0% 0 0 2.3174
structaset (click) 4113 5834 3 70 0 0% 0 0 1.783555
throw (click) 5953 4624 5 53 0 0% 0 0 1.745993

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.