Ruby Benchmarks

Details for Benchmarks at 2026-08-21 00:34:01 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.9% faster than CRuby 4.1.0dev
  • 7.6% faster than YJIT 3.4.7
On railsbench it is
  • 115.6% faster than CRuby 4.1.0dev
  • 15.8% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 minutes
aarch64 runtime: 7 hours, 47 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 95 50 196 50 225
chunky-png 5 32 5 32 50 34 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 446 50 619 50 664
liquid-compile 5 417 5 524 50 666 50 843
liquid-il 5 66 5 69 50 117 50 133
liquid-render 5 170 5 175 50 435 50 464
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 213 50 253 50 301
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 246 50 248
ruby-lsp 5 157 5 162 50 224 50 238
sequel 5 430 5 468 50 599 50 660
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 19
addressable-getters 5 166 5 176 50 184 50 213
addressable-join 5 74 5 87 50 66 50 85
addressable-merge 5 161 5 166 50 222 50 246
addressable-new 5 355 5 361 50 517 50 556
addressable-normalize 5 52 5 59 50 61 50 72
addressable-parse 5 104 5 110 50 104 50 122
addressable-setters 5 186 5 194 50 235 50 258
addressable-to-s 5 165 5 176 50 183 50 213
binarytrees 5 82 5 86 50 136 50 146
blurhash 5 84 5 86 50 145 50 145
erubi 5 137 5 143 50 138 50 157
etanni 5 100 5 78 50 73 50 47
fannkuchredux 5 55 5 54 50 91 50 105
fluentd 5 56 5 74 50 22 50 37
gcbench 5 10 5 10 50 10 50 16
graphql 5 376 5 476 50 565 50 983
graphql-native 5 59 5 89 50 22 50 70
knucleotide 5 164 5 152 50 118 50 107
lee 5 23 5 32 50 10 50 19
matmul 5 53 5 50 50 87 50 98
nbody 5 250 5 255 50 662 50 680
nqueens 5 119 5 123 50 554 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 696 50 812
protoboeuf-encode 5 201 5 203 50 791 50 813
rack 5 441 5 452 50 716 50 727
ruby-json 5 84 5 116 50 51 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 242 50 247 50 309
string_malloc_pressure 5 146 5 32 50 102 50 10
sudoku 5 48 5 49 50 155 50 173
tinygql 5 41 5 45 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 185
30k_methods 5 38 5 39 50 454 50 451
attr_accessor 5 157 5 192 50 1833 50 1917
cfunc_itself 5 347 5 348 50 1255 50 1258
fib 5 125 5 141 50 939 50 938
getivar 5 216 5 310 50 2307 50 2422
getivar-module 5 103 5 138 50 88 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 485 50 294 50 1499
object-new-initialize 5 169 5 264 50 260 50 1015
object-new-no-escape 5 80 5 143 50 89 50 532
respond_to 5 139 5 125 50 3904 50 3900
ruby-xor 5 247 5 255 50 1305 50 1299
send_bmethod 5 118 5 122 50 5538 50 4526
send_cfunc_block 5 106 5 111 50 306 50 301
send_rubyfunc_block 5 196 5 204 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 297
setivar 5 359 5 349 50 4930 50 4925
setivar_object 5 341 5 287 50 764 50 783
setivar_young 5 342 5 287 50 808 50 817
str_concat 5 392 5 420 50 1193 50 939
structaref 5 153 5 193 50 1799 50 1870
structaset 5 198 5 270 50 369 50 491
throw 5 1110 5 1336 50 1445 50 1737

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) 1560715 1440047 204 2662 0 0% 0 0 78.336244
chunky-png (click) 321326 255819 79 1376 1 0% 0 0 38.120926
erubi-rails (click) 1380176 1267860 268 3626 23 0% 0 0 100.170773
hexapdf (click) 1526621 1314735 594 15745 45 0% 0 0 421.785375
liquid-c (click) 561082 507440 113 2224 5 0% 0 0 61.265926
liquid-compile (click) 477637 419791 146 2666 2 0% 0 0 72.706398
liquid-il (click) 614215 542491 70 2726 0 0% 0 0 79.646511
liquid-render (click) 667408 598070 130 2946 8 0% 0 0 77.240287
lobsters (click) 8552197 7226976 3126 63354 125 0% 0 0 2020.305178
mail (click) 870889 824383 345 7716 40 0% 0 0 207.258374
psych-load (click) 287975 241970 60 829 2 0% 0 0 23.249402
railsbench (click) 3353252 3062146 1591 19738 105 0% 0 0 533.642759
rubocop (click) 5760946 4939295 3000 57026 132 0% 6 0 1612.238351
ruby-lsp (click) 1049431 914495 408 7449 47 0% 1 0 197.788398
sequel (click) 518697 402077 11 119 0 0% 0 0 4.013209
shipit (click) 6874184 5828291 3135 49938 147 0% 0 0 1619.275807
addressable-equality (click) 323619 316951 44 1381 1 0% 0 0 33.135242
addressable-getters (click) 281677 257504 26 863 0 0% 0 0 19.639055
addressable-join (click) 289394 252050 24 941 0 0% 0 0 23.270414
addressable-merge (click) 287479 236107 27 896 0 0% 0 0 21.070717
addressable-new (click) 260214 222870 21 563 0 0% 0 0 13.426524
addressable-normalize (click) 318977 262772 43 1327 1 0% 0 0 31.858959
addressable-parse (click) 286614 269911 26 880 0 0% 0 0 20.976798
addressable-setters (click) 262221 252047 20 582 0 0% 0 0 13.626289
addressable-to-s (click) 281564 256686 26 849 0 0% 0 0 19.561739
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.74832
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.746692
erubi (click) 246874 221242 6 134 0 0% 0 0 3.872192
etanni (click) 30039 31433 8 114 0 0% 0 0 3.416243
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.820709
fluentd (click) 511913 440466 7 116 0 0% 0 0 3.601782
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.428704
graphql (click) 415076 380135 74 1940 18 0% 0 0 52.64365
graphql-native (click) 358207 312820 39 532 0 0% 0 0 13.737653
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.633153
lee (click) 317370 278331 50 1102 0 0% 0 0 30.042846
matmul (click) 11103 4709 8 136 0 0% 0 0 4.097442
nbody (click) 14448 21176 6 251 0 0% 0 0 6.176591
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.262243
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.107159
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 70.92185
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.066269
rack (click) 283252 243835 35 581 0 0% 0 0 14.635832
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.716087
rubyboy (click) 705496 639804 154 6875 42 0% 0 0 163.317117
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.551139
splay (click) 34617 22483 9 175 0 0% 0 0 5.231834
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.727303
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.743283
tinygql (click) 302454 265981 59 1026 5 0% 0 0 26.42319
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1870.05896
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.968834
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.098048
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.517942
fib (click) 2659 2995 3 30 0 0% 0 0 1.102681
getivar (click) 3789 6778 3 79 0 0% 0 0 1.923948
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.321181
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.806011
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.884981
object-new (click) 2406 2818 2 36 0 0% 0 0 0.991746
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.290357
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.756201
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.123496
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.804825
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.80217
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.294367
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.739464
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.054758
setivar (click) 2783 3726 3 46 0 0% 0 0 1.24866
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.413396
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.725258
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.421927
structaref (click) 4407 9095 3 88 0 0% 0 0 2.312161
structaset (click) 4113 5834 3 70 0 0% 0 0 1.7831
throw (click) 5953 4624 5 53 0 0% 0 0 1.776819

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.