Ruby Benchmarks

Details for Benchmarks at 2026-08-19 00:33:46 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.5% faster than CRuby 4.1.0dev
  • 9.3% faster than YJIT 3.4.7
On railsbench it is
  • 113.6% faster than CRuby 4.1.0dev
  • 16.4% 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 90 5 95 50 193 50 228
chunky-png 5 32 5 33 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 421 5 443 50 620 50 662
liquid-compile 5 406 5 516 50 542 50 841
liquid-il 5 67 5 67 50 117 50 134
liquid-render 5 173 5 175 50 411 50 465
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 209 50 254 50 298
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 245 50 249
ruby-lsp 5 159 5 164 50 240 50 230
sequel 5 428 5 464 50 595 50 662
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 19
addressable-getters 5 164 5 175 50 184 50 216
addressable-join 5 75 5 86 50 66 50 86
addressable-merge 5 161 5 160 50 222 50 244
addressable-new 5 352 5 360 50 520 50 557
addressable-normalize 5 52 5 57 50 60 50 72
addressable-parse 5 103 5 109 50 104 50 121
addressable-setters 5 184 5 194 50 233 50 261
addressable-to-s 5 164 5 175 50 182 50 213
binarytrees 5 82 5 93 50 136 50 146
blurhash 5 84 5 83 50 144 50 145
erubi 5 140 5 157 50 142 50 159
etanni 5 101 5 83 50 72 50 49
fannkuchredux 5 55 5 57 50 100 50 111
fluentd 5 62 5 67 50 20 50 34
gcbench 5 10 5 10 50 10 50 16
graphql 5 366 5 461 50 575 50 976
graphql-native 5 57 5 89 50 20 50 68
knucleotide 5 162 5 155 50 117 50 109
lee 5 23 5 33 50 10 50 22
matmul 5 53 5 51 50 87 50 97
nbody 5 250 5 252 50 663 50 697
nqueens 5 119 5 126 50 554 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 184 50 694 50 801
protoboeuf-encode 5 200 5 199 50 791 50 806
rack 5 441 5 435 50 717 50 726
ruby-json 5 84 5 117 50 50 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 215 50 250 50 244
string_malloc_pressure 5 145 5 33 50 102 50 10
sudoku 5 48 5 49 50 155 50 172
tinygql 5 41 5 43 50 40 50 56
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 40 50 457 50 456
attr_accessor 5 157 5 200 50 1828 50 1914
cfunc_itself 5 348 5 365 50 1254 50 1254
fib 5 125 5 144 50 939 50 939
getivar 5 210 5 316 50 2300 50 2423
getivar-module 5 104 5 140 50 88 50 120
keyword_args 5 102 5 95 50 1238 50 1240
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 484 50 296 50 1505
object-new-initialize 5 168 5 254 50 259 50 1010
object-new-no-escape 5 80 5 141 50 89 50 535
respond_to 5 139 5 124 50 3900 50 3892
ruby-xor 5 247 5 250 50 1302 50 1315
send_bmethod 5 118 5 122 50 5538 50 4527
send_cfunc_block 5 107 5 105 50 304 50 295
send_rubyfunc_block 5 193 5 206 50 1367 50 1370
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 348 50 4929 50 4921
setivar_object 5 341 5 286 50 761 50 779
setivar_young 5 341 5 285 50 809 50 825
str_concat 5 392 5 435 50 1196 50 900
structaref 5 153 5 205 50 1799 50 1892
structaset 5 198 5 229 50 369 50 484
throw 5 1107 5 1424 50 1445 50 1892

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) 1562867 1409983 204 2669 0 0% 0 0 78.023011
chunky-png (click) 321326 264011 79 1376 1 0% 0 0 37.984373
erubi-rails (click) 1378868 1241566 268 3626 23 0% 0 0 100.39454
hexapdf (click) 1509194 1375534 594 15744 45 0% 0 0 425.803917
liquid-c (click) 543047 493600 113 2224 5 0% 0 0 61.757537
liquid-compile (click) 475691 384926 146 2666 2 0% 0 0 72.920782
liquid-il (click) 595416 536351 70 2721 0 0% 0 0 79.250851
liquid-render (click) 667408 598070 130 2946 8 0% 0 0 76.822897
lobsters (click) 8550829 7164086 3126 63367 125 0% 0 0 2017.609357
mail (click) 870889 824415 345 7716 40 0% 0 0 207.482063
psych-load (click) 284233 270300 60 829 2 0% 0 0 23.016095
railsbench (click) 3352168 3068536 1591 19736 105 0% 0 0 532.854075
rubocop (click) 5760946 4955737 3000 57026 132 0% 6 0 1615.479724
ruby-lsp (click) 1049426 906335 408 7449 47 0% 1 0 199.229338
sequel (click) 522995 472573 11 119 0 0% 0 0 4.067904
shipit (click) 7064031 5843492 3125 50141 147 0% 0 0 1606.596468
addressable-equality (click) 321673 290258 44 1381 1 0% 0 0 33.271521
addressable-getters (click) 281956 241348 26 863 0 0% 0 0 20.404985
addressable-join (click) 287448 241741 24 941 0 0% 0 0 22.281238
addressable-merge (click) 270441 256463 27 896 0 0% 0 0 20.897784
addressable-new (click) 264256 227540 21 563 0 0% 0 0 13.575875
addressable-normalize (click) 317031 277039 43 1327 1 0% 0 0 31.944097
addressable-parse (click) 286614 253527 26 880 0 0% 0 0 21.021553
addressable-setters (click) 264451 229821 20 582 0 0% 0 0 14.013803
addressable-to-s (click) 281268 272754 26 849 0 0% 0 0 19.488106
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.740869
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.882974
erubi (click) 244921 202736 6 134 0 0% 0 0 3.792328
etanni (click) 30080 23270 8 114 0 0% 0 0 3.423935
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.82769
fluentd (click) 510478 398290 7 116 0 0% 0 0 3.658492
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.576457
graphql (click) 413130 345225 74 1940 18 0% 0 0 53.109155
graphql-native (click) 356261 327087 39 532 0 0% 0 0 13.853762
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.793382
lee (click) 317370 245563 50 1102 0 0% 0 0 30.453044
matmul (click) 11103 4709 8 136 0 0% 0 0 4.098941
nbody (click) 14448 21176 6 251 0 0% 0 0 6.163928
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.213822
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 106.910857
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.66706
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.04672
rack (click) 283531 268607 35 581 0 0% 0 0 14.825463
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.745437
rubyboy (click) 686223 592151 154 6875 42 0% 0 0 162.568461
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.638122
splay (click) 34617 22483 9 175 0 0% 0 0 5.293306
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.780982
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.790481
tinygql (click) 300508 255652 59 1026 5 0% 0 0 26.445869
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1866.355617
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 476.865865
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.100919
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.503004
fib (click) 2659 2995 3 30 0 0% 0 0 1.135943
getivar (click) 3789 6778 3 79 0 0% 0 0 1.920918
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.295132
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.816262
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.986994
object-new (click) 2406 2818 2 36 0 0% 0 0 1.004265
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.322341
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.779776
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.120865
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.795623
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.814874
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.322082
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.745911
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.068519
setivar (click) 2783 3726 3 46 0 0% 0 0 1.272407
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.413052
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.734764
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.427917
structaref (click) 4407 9095 3 88 0 0% 0 0 2.304297
structaset (click) 4113 5834 3 70 0 0% 0 0 1.793354
throw (click) 5953 4624 5 53 0 0% 0 0 1.760518

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.