Ruby Benchmarks

Details for Benchmarks at 2026-08-30 01:05:33 UTC

YJIT metrics from the ruby-bench suite using Ruby 22e4a75d67.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.7% faster than CRuby 4.1.0dev
  • 7.3% faster than YJIT 3.4.7
On railsbench it is
  • 113.4% faster than CRuby 4.1.0dev
  • 15.1% 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 94 50 196 50 221
chunky-png 5 32 5 32 50 34 50 28
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 445 50 625 50 678
liquid-compile 5 407 5 520 50 581 50 838
liquid-il 5 67 5 70 50 116 50 134
liquid-render 5 172 5 172 50 434 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 211 50 253 50 294
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 252
ruby-lsp 5 164 5 167 50 238 50 229
sequel 5 430 5 455 50 598 50 640
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 175 50 184 50 212
addressable-join 5 75 5 84 50 64 50 86
addressable-merge 5 161 5 164 50 222 50 243
addressable-new 5 351 5 358 50 516 50 548
addressable-normalize 5 52 5 59 50 60 50 71
addressable-parse 5 103 5 108 50 104 50 121
addressable-setters 5 185 5 192 50 232 50 258
addressable-to-s 5 165 5 174 50 182 50 213
binarytrees 5 82 5 92 50 136 50 170
blurhash 5 84 5 87 50 145 50 145
erubi 5 141 5 149 50 139 50 149
etanni 5 101 5 78 50 72 50 45
fannkuchredux 5 55 5 56 50 100 50 111
fluentd 5 62 5 64 50 21 50 28
gcbench 5 10 5 11 50 10 50 17
graphql 5 367 5 479 50 532 50 991
graphql-native 5 57 5 88 50 22 50 71
knucleotide 5 163 5 149 50 117 50 103
lee 5 23 5 34 50 10 50 21
matmul 5 53 5 55 50 88 50 100
nbody 5 250 5 279 50 663 50 682
nqueens 5 119 5 122 50 554 50 595
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 696 50 784
protoboeuf-encode 5 201 5 200 50 794 50 785
rack 5 432 5 463 50 707 50 739
ruby-json 5 84 5 112 50 51 50 89
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 223 50 250 50 275
string_malloc_pressure 5 147 5 33 50 102 50 10
sudoku 5 48 5 49 50 155 50 175
tinygql 5 41 5 45 50 36 50 56
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 452 50 458
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 157 5 209 50 1834 50 1937
cfunc_itself 5 348 5 360 50 1255 50 1258
fib 5 125 5 139 50 939 50 939
getivar 5 215 5 330 50 2315 50 2436
getivar-module 5 103 5 147 50 89 50 124
keyword_args 5 102 5 106 50 1240 50 1243
loops-times 5 23 5 27 50 63 50 62
object-new 5 268 5 670 50 296 50 1580
object-new-initialize 5 168 5 271 50 259 50 1022
object-new-no-escape 5 81 5 152 50 89 50 544
respond_to 5 139 5 129 50 3906 50 3906
ruby-xor 5 247 5 253 50 1306 50 1303
send_bmethod 5 118 5 117 50 5538 50 4527
send_cfunc_block 5 107 5 108 50 305 50 279
send_rubyfunc_block 5 196 5 206 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 297
setivar 5 359 5 347 50 4931 50 4923
setivar_object 5 341 5 287 50 761 50 783
setivar_young 5 341 5 287 50 809 50 826
str_concat 5 392 5 415 50 1195 50 944
structaref 5 153 5 198 50 1801 50 1892
structaset 5 198 5 249 50 368 50 500
throw 5 1109 5 1416 50 1446 50 1873

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) 1562555 1398046 204 2678 0 0% 0 0 78.84127
chunky-png (click) 321387 264780 79 1378 1 0% 0 0 38.343896
erubi-rails (click) 1378589 1171260 268 3636 23 0% 0 0 93.617336
hexapdf (click) 1524113 1340504 593 15772 45 0% 0 0 421.014953
liquid-c (click) 560145 474916 113 2227 5 0% 0 0 62.009863
liquid-compile (click) 476753 403700 146 2677 2 0% 0 0 73.229537
liquid-il (click) 614173 526529 70 2740 0 0% 0 0 79.809211
liquid-render (click) 666145 581713 130 2949 8 0% 0 0 76.960705
lobsters (click) 8546374 7284123 3126 63522 125 0% 0 0 2030.713998
mail (click) 869545 775884 345 7750 40 0% 0 0 207.476278
psych-load (click) 286345 257175 60 836 2 0% 0 0 23.520696
railsbench (click) 3349053 2814158 1591 19816 105 0% 0 0 534.387003
rubocop (click) 5756653 4963294 3000 57127 132 0% 6 0 1611.486139
ruby-lsp (click) 1048213 973254 408 7486 47 0% 1 0 200.148839
sequel (click) 497127 422448 11 119 0 0% 0 0 4.234518
shipit (click) 7030515 5825948 3130 50239 147 0% 0 0 1623.89676
addressable-equality (click) 323609 300941 44 1382 1 0% 0 0 33.423531
addressable-getters (click) 284884 278232 26 863 0 0% 0 0 20.621014
addressable-join (click) 289356 277013 24 941 0 0% 0 0 22.708442
addressable-merge (click) 289163 262935 27 896 0 0% 0 0 21.656589
addressable-new (click) 247199 232092 21 564 0 0% 0 0 13.712888
addressable-normalize (click) 318688 262918 43 1328 1 0% 0 0 31.453724
addressable-parse (click) 268617 240962 26 880 0 0% 0 0 21.040282
addressable-setters (click) 247389 226165 20 582 0 0% 0 0 14.227199
addressable-to-s (click) 266453 230576 26 849 0 0% 0 0 20.172189
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.785058
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.799189
erubi (click) 245427 220062 6 135 0 0% 0 0 3.906647
etanni (click) 30039 31433 8 114 0 0% 0 0 3.454806
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.865338
fluentd (click) 512888 475399 7 116 0 0% 0 0 3.55899
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.447631
graphql (click) 414434 380582 74 1944 18 0% 0 0 52.824385
graphql-native (click) 339737 308349 39 532 0 0% 0 0 13.551367
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.607406
lee (click) 317512 262836 50 1107 0 0% 0 0 30.493832
matmul (click) 11076 4720 8 137 0 0% 0 0 4.184301
nbody (click) 14448 21176 6 251 0 0% 0 0 6.095163
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.242826
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.727783
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.840367
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.300555
rack (click) 283785 236518 35 581 0 0% 0 0 15.260627
ruby-json (click) 20040 18102 8 211 0 0% 0 0 5.872736
rubyboy (click) 669107 639969 154 6525 42 0% 0 0 163.084616
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.340498
splay (click) 34536 22516 9 175 0 0% 0 0 5.252409
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.785302
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.896032
tinygql (click) 301065 265608 59 1041 5 0% 0 0 26.845393
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1870.28933
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 477.049303
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 5004.322029
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090394
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.488083
fib (click) 2659 2995 3 30 0 0% 0 0 1.091878
getivar (click) 3789 6778 3 79 0 0% 0 0 1.89652
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.32875
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.815866
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.915687
object-new (click) 2352 2825 2 38 0 0% 0 0 0.993749
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.305483
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.753227
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.119234
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.779135
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.828847
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.326518
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.760962
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.061258
setivar (click) 2783 3726 3 46 0 0% 0 0 1.263587
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.403273
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.710073
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.465864
structaref (click) 4407 9095 3 88 0 0% 0 0 2.35102
structaset (click) 4113 5834 3 70 0 0% 0 0 1.803295
throw (click) 5953 4624 5 53 0 0% 0 0 1.736755

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.