Ruby Benchmarks

Details for Benchmarks at 2026-08-17 00:33:44 UTC

YJIT metrics from the ruby-bench suite using Ruby 83131dbf44.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.4% faster than CRuby 4.1.0dev
  • 9.7% faster than YJIT 3.4.7
On railsbench it is
  • 120.4% faster than CRuby 4.1.0dev
  • 17.1% 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 91 5 97 50 193 50 224
chunky-png 5 32 5 33 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 444 50 621 50 674
liquid-compile 5 419 5 515 50 584 50 841
liquid-il 5 67 5 68 50 116 50 133
liquid-render 5 173 5 174 50 431 50 465
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 210 50 253 50 297
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 158 50 247 50 255
ruby-lsp 5 162 5 164 50 214 50 236
sequel 5 420 5 464 50 579 50 664
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 165 5 175 50 183 50 214
addressable-join 5 75 5 85 50 65 50 84
addressable-merge 5 161 5 162 50 222 50 251
addressable-new 5 354 5 359 50 520 50 549
addressable-normalize 5 52 5 57 50 60 50 72
addressable-parse 5 104 5 109 50 104 50 122
addressable-setters 5 185 5 192 50 233 50 260
addressable-to-s 5 164 5 174 50 183 50 214
binarytrees 5 82 5 92 50 136 50 146
blurhash 5 84 5 83 50 145 50 145
erubi 5 138 5 158 50 141 50 158
etanni 5 100 5 83 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 111
fluentd 5 62 5 65 50 20 50 49
gcbench 5 10 5 10 50 10 50 17
graphql 5 369 5 456 50 570 50 999
graphql-native 5 57 5 89 50 20 50 66
knucleotide 5 163 5 156 50 117 50 110
lee 5 23 5 33 50 10 50 21
matmul 5 53 5 51 50 87 50 97
nbody 5 250 5 251 50 663 50 686
nqueens 5 119 5 123 50 554 50 598
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 695 50 821
protoboeuf-encode 5 197 5 200 50 793 50 768
rack 5 443 5 441 50 719 50 734
ruby-json 5 84 5 116 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 213 50 250 50 244
string_malloc_pressure 5 145 5 32 50 103 50 10
sudoku 5 48 5 49 50 155 50 170
tinygql 5 41 5 43 50 40 50 56
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 39 50 450 50 452
attr_accessor 5 157 5 203 50 1835 50 1930
cfunc_itself 5 346 5 378 50 1255 50 1258
fib 5 121 5 141 50 939 50 939
getivar 5 210 5 326 50 2305 50 2436
getivar-module 5 103 5 143 50 89 50 125
keyword_args 5 102 5 106 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 489 50 297 50 1526
object-new-initialize 5 168 5 259 50 260 50 1023
object-new-no-escape 5 80 5 137 50 89 50 537
respond_to 5 139 5 123 50 3907 50 3903
ruby-xor 5 247 5 250 50 1306 50 1314
send_bmethod 5 117 5 122 50 5538 50 4527
send_cfunc_block 5 106 5 104 50 305 50 302
send_rubyfunc_block 5 196 5 204 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 298 50 298
setivar 5 359 5 347 50 4930 50 4922
setivar_object 5 341 5 286 50 763 50 636
setivar_young 5 342 5 286 50 808 50 663
str_concat 5 390 5 433 50 1194 50 939
structaref 5 153 5 194 50 1801 50 1892
structaset 5 199 5 240 50 369 50 484
throw 5 1110 5 1414 50 1442 50 1865

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) 1561948 1409165 204 2660 0 0% 0 0 77.892587
chunky-png (click) 315487 256686 79 1376 1 0% 0 0 37.968403
erubi-rails (click) 1380176 1235012 268 3626 23 0% 0 0 94.111504
hexapdf (click) 1528216 1283702 593 15740 45 0% 0 0 425.124477
liquid-c (click) 561082 507440 113 2224 5 0% 0 0 61.667056
liquid-compile (click) 467776 391680 146 2666 2 0% 0 0 73.277488
liquid-il (click) 613776 542194 70 2724 0 0% 0 0 79.541467
liquid-render (click) 667408 598070 130 2946 8 0% 0 0 77.091981
lobsters (click) 8541882 7165681 3126 63217 125 0% 0 0 2024.328218
mail (click) 870889 824383 345 7716 40 0% 0 0 206.969858
psych-load (click) 278108 262991 60 829 2 0% 0 0 22.939057
railsbench (click) 3353098 3070258 1591 19736 105 0% 0 0 533.464814
rubocop (click) 5763262 5023881 3000 57032 132 0% 6 0 1618.789027
ruby-lsp (click) 1049425 906375 408 7449 47 0% 1 0 199.808077
sequel (click) 506514 441132 11 119 0 0% 0 0 4.491915
shipit (click) 7042444 5881193 3130 49924 147 0% 0 0 1585.062111
addressable-equality (click) 323619 284183 44 1381 1 0% 0 0 33.260079
addressable-getters (click) 283902 251657 26 863 0 0% 0 0 20.200616
addressable-join (click) 289394 252050 24 941 0 0% 0 0 23.056916
addressable-merge (click) 270441 256463 27 896 0 0% 0 0 21.02087
addressable-new (click) 245277 229380 21 563 0 0% 0 0 13.520832
addressable-normalize (click) 318977 262772 43 1327 1 0% 0 0 31.731618
addressable-parse (click) 286614 253527 26 880 0 0% 0 0 20.99902
addressable-setters (click) 263190 236056 20 582 0 0% 0 0 13.774328
addressable-to-s (click) 283510 234227 26 849 0 0% 0 0 19.987141
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.768789
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.850541
erubi (click) 246874 229434 6 134 0 0% 0 0 3.840744
etanni (click) 30039 31433 8 114 0 0% 0 0 3.43825
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.871882
fluentd (click) 512142 424812 7 116 0 0% 0 0 3.689726
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.489314
graphql (click) 396102 365513 74 1940 17 0% 0 0 52.946492
graphql-native (click) 340168 307132 39 532 0 0% 0 0 13.634114
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.726296
lee (click) 319316 313221 50 1102 0 0% 0 0 30.402742
matmul (click) 11103 4709 8 136 0 0% 0 0 4.082313
nbody (click) 14448 21176 6 251 0 0% 0 0 6.108309
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.182784
optcarrot (click) 321897 302848 188 4600 34 0% 0 0 107.119465
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.002398
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.63323
rack (click) 285482 278933 35 581 0 0% 0 0 14.697766
ruby-json (click) 20108 18120 8 210 0 0% 0 0 5.76707
rubyboy (click) 705496 639804 154 6875 42 0% 0 0 163.462652
rubykon (click) 146630 137068 137 2078 3 0% 0 0 54.74425
splay (click) 34617 22483 9 175 0 0% 0 0 5.284503
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.767167
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.834881
tinygql (click) 302454 265981 59 1026 5 0% 0 0 26.496012
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1869.832162
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 475.263194
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090919
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.496436
fib (click) 2659 2995 3 30 0 0% 0 0 1.113782
getivar (click) 3789 6778 3 79 0 0% 0 0 1.923922
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.328582
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807115
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.932172
object-new (click) 2406 2818 2 36 0 0% 0 0 1.019212
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.295128
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.736725
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.127718
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.819346
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.836487
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.327194
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.740271
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.050333
setivar (click) 2783 3726 3 46 0 0% 0 0 1.249768
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.384303
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.686305
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.43159
structaref (click) 4407 9095 3 88 0 0% 0 0 2.357156
structaset (click) 4113 5834 3 70 0 0% 0 0 1.750274
throw (click) 5953 4624 5 53 0 0% 0 0 1.774324

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.