Ruby Benchmarks

Details for Benchmarks at 2026-08-13 00:41:20 UTC

YJIT metrics from the ruby-bench suite using Ruby 095236cb19.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.9% faster than CRuby 4.1.0dev
  • 11.5% faster than YJIT 3.4.7
On railsbench it is
  • 120.9% faster than CRuby 4.1.0dev
  • 17.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 46 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 90 5 95 50 191 50 234
chunky-png 5 32 5 33 50 33 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 444 50 613 50 673
liquid-compile 5 419 5 519 50 582 50 849
liquid-il 5 66 5 69 50 117 50 135
liquid-render 5 170 5 173 50 410 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 254 50 299
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 246 50 245
ruby-lsp 5 163 5 166 50 215 50 242
sequel 5 428 5 468 50 590 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 178 50 184 50 212
addressable-join 5 75 5 87 50 66 50 86
addressable-merge 5 160 5 162 50 222 50 247
addressable-new 5 350 5 357 50 519 50 546
addressable-normalize 5 52 5 57 50 60 50 72
addressable-parse 5 103 5 110 50 104 50 124
addressable-setters 5 185 5 197 50 233 50 261
addressable-to-s 5 164 5 178 50 183 50 214
binarytrees 5 82 5 93 50 136 50 145
blurhash 5 83 5 85 50 145 50 143
erubi 5 139 5 158 50 140 50 163
etanni 5 101 5 82 50 72 50 50
fannkuchredux 5 55 5 57 50 101 50 110
fluentd 5 62 5 65 50 30 50 45
gcbench 5 10 5 10 50 10 50 16
graphql 5 373 5 475 50 569 50 999
graphql-native 5 58 5 88 50 23 50 64
knucleotide 5 163 5 154 50 117 50 107
lee 5 22 5 32 50 10 50 20
matmul 5 53 5 52 50 87 50 96
nbody 5 249 5 244 50 662 50 635
nqueens 5 119 5 124 50 554 50 598
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 190 50 696 50 816
protoboeuf-encode 5 201 5 207 50 793 50 774
rack 5 443 5 482 50 713 50 795
ruby-json 5 84 5 117 50 51 50 95
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 218 50 250 50 256
string_malloc_pressure 5 148 5 36 50 101 50 10
sudoku 5 48 5 50 50 155 50 169
tinygql 5 42 5 45 50 40 50 55
30k_ifelse 5 28 5 28 50 187 50 185
30k_methods 5 38 5 39 50 455 50 454
attr_accessor 5 157 5 199 50 1833 50 1923
cfunc_itself 5 348 5 353 50 1255 50 1258
fib 5 125 5 145 50 939 50 939
getivar 5 216 5 319 50 2316 50 2429
getivar-module 5 103 5 138 50 89 50 124
keyword_args 5 102 5 108 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 60
object-new 5 268 5 485 50 299 50 1495
object-new-initialize 5 168 5 260 50 260 50 1026
object-new-no-escape 5 81 5 143 50 89 50 531
respond_to 5 139 5 125 50 3905 50 3892
ruby-xor 5 247 5 258 50 1306 50 1316
send_bmethod 5 118 5 99 50 5538 50 4527
send_cfunc_block 5 106 5 111 50 305 50 303
send_rubyfunc_block 5 196 5 211 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 297
setivar 5 359 5 348 50 4930 50 4921
setivar_object 5 341 5 286 50 763 50 635
setivar_young 5 342 5 286 50 810 50 660
str_concat 5 392 5 441 50 1196 50 1023
structaref 5 153 5 201 50 1800 50 1901
structaset 5 199 5 256 50 370 50 488
throw 5 1099 5 1423 50 1443 50 1888

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) 1551729 1373909 203 2600 0 0% 0 0 70.937946
chunky-png (click) 321047 288359 79 1376 1 0% 0 0 38.090827
erubi-rails (click) 1380176 1259564 268 3626 23 0% 0 0 100.100507
hexapdf (click) 1523468 1327052 593 15740 45 0% 0 0 424.848502
liquid-c (click) 542754 493244 113 2224 5 0% 0 0 62.098981
liquid-compile (click) 475691 401330 146 2666 2 0% 0 0 73.573338
liquid-il (click) 612365 523887 70 2725 0 0% 0 0 79.403432
liquid-render (click) 665462 555013 130 2946 8 0% 0 0 76.990565
lobsters (click) 8548801 7206320 3126 63311 125 0% 0 0 2007.24133
mail (click) 870889 824415 345 7716 40 0% 0 0 205.864611
psych-load (click) 287975 241970 60 829 2 0% 0 0 23.23721
railsbench (click) 3353181 3062199 1591 19737 105 0% 0 0 566.945721
rubocop (click) 5759421 4994189 3000 57035 133 0% 6 0 1606.938091
ruby-lsp (click) 1049425 922719 408 7449 47 0% 1 0 198.206639
sequel (click) 522995 472573 11 119 0 0% 0 0 4.406181
shipit (click) 6850977 5838365 3136 50028 147 0% 0 0 1621.124849
addressable-equality (click) 318879 286518 44 1381 1 0% 0 0 32.681354
addressable-getters (click) 283902 251657 26 863 0 0% 0 0 20.410239
addressable-join (click) 289394 252050 24 941 0 0% 0 0 23.222952
addressable-merge (click) 284680 240554 27 896 0 0% 0 0 20.873115
addressable-new (click) 264256 227540 21 563 0 0% 0 0 13.506445
addressable-normalize (click) 317031 277039 43 1327 1 0% 0 0 31.516257
addressable-parse (click) 267635 230791 26 880 0 0% 0 0 20.595229
addressable-setters (click) 259706 215767 20 582 0 0% 0 0 13.880841
addressable-to-s (click) 278765 236557 26 849 0 0% 0 0 19.758753
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.79076
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.774161
erubi (click) 244739 202566 6 134 0 0% 0 0 3.826049
etanni (click) 30080 23270 8 114 0 0% 0 0 3.41973
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.871898
fluentd (click) 508780 387302 7 116 0 0% 0 0 3.645942
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.41595
graphql (click) 412851 353209 74 1940 18 0% 0 0 52.806972
graphql-native (click) 355982 318647 39 532 0 0% 0 0 13.770728
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.764373
lee (click) 317091 261719 50 1102 0 0% 0 0 30.140426
matmul (click) 11103 4709 8 136 0 0% 0 0 4.113958
nbody (click) 14448 21176 6 251 0 0% 0 0 6.098562
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.222497
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.909437
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.461265
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.305176
rack (click) 283349 227489 35 581 0 0% 0 0 14.47318
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.788145
rubyboy (click) 703647 686917 154 6875 42 0% 0 0 162.320047
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.105929
splay (click) 34617 22483 9 175 0 0% 0 0 5.235049
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.713412
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.858181
tinygql (click) 300229 271808 59 1026 5 0% 0 0 25.968083
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1864.663848
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.696696
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.066847
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.494364
fib (click) 2659 2995 3 30 0 0% 0 0 1.09044
getivar (click) 3789 6778 3 79 0 0% 0 0 1.909763
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.317231
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.805129
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.888656
object-new (click) 2406 2818 2 36 0 0% 0 0 1.011778
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.304705
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.791818
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.107941
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.808968
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.788677
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.312017
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.754016
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.073281
setivar (click) 2783 3726 3 46 0 0% 0 0 1.256717
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.40967
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.700449
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.506589
structaref (click) 4407 9095 3 88 0 0% 0 0 2.29741
structaset (click) 4113 5834 3 70 0 0% 0 0 1.775485
throw (click) 5953 4624 5 53 0 0% 0 0 1.739618

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.