Ruby Benchmarks

Details for Benchmarks at 2026-07-30 00:50:46 UTC

YJIT metrics from the ruby-bench suite using Ruby 94933bfebf.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.0% faster than CRuby 4.1.0dev
  • 6.9% faster than YJIT 3.4.7
On railsbench it is
  • 112.2% faster than CRuby 4.1.0dev
  • 16.5% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 9 minutes
aarch64 runtime: 7 hours, 50 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 200 50 207
chunky-png 5 32 5 30 50 34 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 438 50 623 50 663
liquid-compile 5 420 5 517 50 581 50 835
liquid-il 5 67 5 68 50 116 50 125
liquid-render 5 173 5 173 50 434 50 458
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 50 254 50 292
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 246 50 239
ruby-lsp 5 158 5 161 50 223 50 222
sequel 5 427 5 463 50 586 50 659
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 16
addressable-getters 5 165 5 171 50 183 50 207
addressable-join 5 75 5 83 50 66 50 79
addressable-merge 5 162 5 157 50 222 50 230
addressable-new 5 356 5 344 50 519 50 520
addressable-normalize 5 53 5 57 50 61 50 69
addressable-parse 5 104 5 106 50 104 50 116
addressable-setters 5 186 5 182 50 234 50 249
addressable-to-s 5 165 5 170 50 181 50 204
binarytrees 5 81 5 87 50 136 50 168
blurhash 5 84 5 82 50 145 50 145
erubi 5 134 5 155 50 138 50 162
etanni 5 100 5 82 50 72 50 51
fannkuchredux 5 55 5 56 50 100 50 110
fluentd 5 62 5 62 50 27 50 27
gcbench 5 10 5 10 50 10 50 10
graphql 5 373 5 461 50 564 50 888
graphql-native 5 58 5 87 50 23 50 56
knucleotide 5 163 5 149 50 117 50 104
lee 5 23 5 31 50 10 50 19
matmul 5 53 5 51 50 88 50 97
nbody 5 250 5 255 50 662 50 633
nqueens 5 119 5 126 50 554 50 599
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 172 50 697 50 666
protoboeuf-encode 5 201 5 200 50 808 50 781
rack 5 442 5 462 50 717 50 787
ruby-json 5 84 5 113 50 51 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 204 50 250 50 234
string_malloc_pressure 5 149 5 33 50 101 50 10
sudoku 5 48 5 50 50 155 50 172
tinygql 5 42 5 42 50 40 50 51
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 454 50 454
attr_accessor 5 157 5 167 50 1835 50 1863
cfunc_itself 5 347 5 318 50 1255 50 1258
fib 5 125 5 135 50 939 50 939
getivar 5 210 5 318 50 2306 50 2429
getivar-module 5 103 5 144 50 89 50 125
keyword_args 5 102 5 101 50 1240 50 1242
loops-times 5 23 5 25 50 63 50 61
object-new 5 268 5 477 50 297 50 1483
object-new-initialize 5 169 5 256 50 259 50 517
object-new-no-escape 5 80 5 140 50 89 50 365
respond_to 5 139 5 122 50 3901 50 3896
ruby-xor 5 247 5 239 50 1305 50 1301
send_bmethod 5 118 5 114 50 5539 50 4526
send_cfunc_block 5 107 5 104 50 305 50 296
send_rubyfunc_block 5 196 5 200 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 351 50 4929 50 4925
setivar_object 5 344 5 273 50 763 50 724
setivar_young 5 342 5 273 50 809 50 739
str_concat 5 391 5 434 50 1200 50 1065
structaref 5 153 5 177 50 1800 50 1861
structaset 5 198 5 229 50 370 50 496
throw 5 1109 5 1294 50 1441 50 1640

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) 1560421 1368333 204 2686 0 0% 0 0 78.663663
chunky-png (click) 319008 278395 79 1372 1 0% 0 0 39.01134
erubi-rails (click) 1378735 1170240 268 3630 23 0% 0 0 93.543688
hexapdf (click) 1522170 1433682 593 15682 45 0% 0 0 419.612979
liquid-c (click) 559051 451087 114 2226 5 0% 0 0 58.843588
liquid-compile (click) 478304 431392 146 2679 2 0% 0 0 72.224542
liquid-il (click) 612233 531840 70 2720 0 0% 0 0 79.473124
liquid-render (click) 668022 602311 131 2945 8 0% 0 0 76.730063
lobsters (click) 8530621 7154298 3127 63070 125 0% 0 0 2007.518617
mail (click) 863238 801746 345 7654 40 0% 0 0 204.404295
psych-load (click) 276463 262854 60 820 2 0% 0 0 22.386564
railsbench (click) 3356899 2986075 1591 19737 105 0% 0 0 531.529937
rubocop (click) 5762574 4973569 3000 57020 132 0% 6 0 1632.105373
ruby-lsp (click) 1046100 933967 408 7425 47 0% 1 0 195.128697
sequel (click) 520226 502590 11 119 0 0% 0 0 4.368004
shipit (click) 6898777 5792636 3135 50062 147 0% 0 0 1585.223929
addressable-equality (click) 323916 293393 44 1381 1 0% 0 0 33.24949
addressable-getters (click) 280506 223596 26 863 0 0% 0 0 20.091382
addressable-join (click) 285998 232181 24 941 0 0% 0 0 22.798908
addressable-merge (click) 285771 250860 27 896 0 0% 0 0 20.934928
addressable-new (click) 264553 228558 21 563 0 0% 0 0 13.460973
addressable-normalize (click) 315328 258995 43 1327 1 0% 0 0 30.999143
addressable-parse (click) 283218 217274 26 880 0 0% 0 0 20.681393
addressable-setters (click) 260802 217852 20 582 0 0% 0 0 13.869186
addressable-to-s (click) 280947 231437 26 849 0 0% 0 0 19.749929
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.782393
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.826399
erubi (click) 246285 220779 6 134 0 0% 0 0 3.954266
etanni (click) 33079 34728 8 114 0 0% 0 0 3.428906
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.802535
fluentd (click) 511022 448848 7 116 0 0% 0 0 3.589778
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.519287
graphql (click) 396843 343645 74 1939 17 0% 0 0 52.138653
graphql-native (click) 358633 340224 39 532 0 0% 0 0 13.448819
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.758741
lee (click) 319226 289261 50 1101 0 0% 0 0 30.438911
matmul (click) 11103 4709 8 136 0 0% 0 0 4.102251
nbody (click) 14448 21176 6 251 0 0% 0 0 6.073024
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.169195
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.201207
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.034303
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.197714
rack (click) 285429 246763 35 581 0 0% 0 0 14.439258
ruby-json (click) 19789 17789 8 206 0 0% 0 0 5.697845
rubyboy (click) 707720 674326 154 6871 42 0% 0 0 162.968802
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.019839
splay (click) 34682 14303 9 175 0 0% 0 0 5.176851
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.719052
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.868195
tinygql (click) 298187 278498 59 1024 5 0% 0 0 26.162192
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1867.146832
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 472.821674
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.070478
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.510311
fib (click) 2659 2995 3 30 0 0% 0 0 1.108787
getivar (click) 3789 6778 3 79 0 0% 0 0 1.914417
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.298414
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.813163
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.912034
object-new (click) 2406 2818 2 36 0 0% 0 0 0.996122
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.310836
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.768342
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.138512
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.789421
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.824196
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.318035
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.778151
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.064902
setivar (click) 2783 3726 3 46 0 0% 0 0 1.22376
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.399152
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.709568
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.500522
structaref (click) 4407 9095 3 88 0 0% 0 0 2.326424
structaset (click) 4113 5834 3 70 0 0% 0 0 1.756372
throw (click) 5953 4624 5 53 0 0% 0 0 1.779237

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.