Ruby Benchmarks

Details for Benchmarks at 2026-02-25 00:55:24 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.0% faster than CRuby 4.1.0dev
  • 6.1% faster than YJIT 3.4.7
On railsbench it is
  • 113.6% faster than CRuby 4.1.0dev
  • 12.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 17 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 203 50 241
chunky-png 5 31 5 33 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 430 50 623 50 633
liquid-compile 5 415 5 482 50 552 50 738
liquid-render 5 170 5 175 50 433 50 437
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 193 50 253 50 260
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 246 50 253
ruby-lsp 5 157 5 164 50 231 50 234
sequel 5 415 5 435 50 584 50 608
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 174 50 182 50 203
addressable-join 5 73 5 79 50 65 50 75
addressable-merge 5 160 5 159 50 222 50 227
addressable-new 5 351 5 359 50 524 50 534
addressable-normalize 5 53 5 55 50 59 50 63
addressable-parse 5 103 5 107 50 104 50 113
addressable-setters 5 183 5 188 50 229 50 241
addressable-to-s 5 163 5 172 50 182 50 202
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 86 50 143 50 145
erubi 5 127 5 146 50 139 50 146
etanni 5 97 5 70 50 71 50 38
fannkuchredux 5 55 5 57 50 102 50 107
fluentd 5 56 5 66 50 22 50 32
graphql 5 374 5 472 50 527 50 870
graphql-native 5 57 5 88 50 21 50 66
knucleotide 5 163 5 158 50 119 50 112
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 95
nbody 5 247 5 297 50 676 50 702
nqueens 5 116 5 124 50 556 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 706 50 762
protoboeuf-encode 5 193 5 206 50 832 50 813
rack 5 436 5 461 50 708 50 732
ruby-json 5 81 5 101 50 46 50 77
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 166
tinygql 5 41 5 44 50 40 50 51
30k_ifelse 5 28 5 28 50 183 50 185
30k_methods 5 38 5 41 50 452 50 451
attr_accessor 5 157 5 193 50 1833 50 1912
cfunc_itself 5 327 5 342 50 1253 50 1259
fib 5 124 5 144 50 939 50 939
getivar 5 217 5 327 50 2316 50 2430
getivar-module 5 104 5 141 50 90 50 270
keyword_args 5 100 5 103 50 1240 50 1243
loops-times 5 23 5 27 50 63 50 62
object-new 5 268 5 409 50 297 50 893
respond_to 5 139 5 133 50 3890 50 3903
ruby-xor 5 236 5 253 50 1313 50 1297
send_bmethod 5 116 5 126 50 5539 50 4527
send_cfunc_block 5 107 5 106 50 353 50 385
send_rubyfunc_block 5 249 5 258 50 6925 50 6927
setivar 5 359 5 482 50 4924 50 5044
setivar_object 5 341 5 306 50 752 50 622
setivar_young 5 343 5 309 50 798 50 656
str_concat 5 390 5 453 50 1196 50 1141
structaref 5 156 5 182 50 1812 50 1862
structaset 5 203 5 264 50 396 50 500
throw 5 1088 5 1341 50 1406 50 1823

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) 1552561 1333341 203 2646 0 0% 0 0 75.477051
chunky-png (click) 321334 271355 79 1376 1 0% 0 0 39.325165
erubi-rails (click) 1375263 1131092 268 3626 22 0% 0 0 96.895668
hexapdf (click) 1526180 1272794 593 15714 44 0% 0 0 438.888946
liquid-c (click) 558674 455857 114 2236 5 0% 0 0 59.603649
liquid-compile (click) 479456 430227 146 2699 2 0% 0 0 78.073536
liquid-render (click) 653739 549337 131 2959 8 0% 0 0 80.525356
lobsters (click) 8720007 7222921 3124 64431 120 0% 0 0 2117.864589
mail (click) 871785 814413 345 7728 40 0% 0 0 213.420844
psych-load (click) 278987 237795 61 827 2 0% 0 0 23.682502
railsbench (click) 3352054 2925190 1592 19758 97 0% 0 0 554.916372
rubocop (click) 5790274 5016185 3002 57210 125 0% 6 0 1673.239632
ruby-lsp (click) 1040200 910712 408 7446 46 0% 1 0 207.017533
sequel (click) 503218 422529 11 119 0 0% 0 0 3.819516
shipit (click) 7132458 6074028 3300 52156 168 0% 0 0 1699.731804
addressable-equality (click) 317291 260422 44 1380 1 0% 0 0 34.427445
addressable-getters (click) 274793 240834 26 863 0 0% 0 0 20.96954
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.445231
addressable-merge (click) 282844 238902 27 896 0 0% 0 0 22.29958
addressable-new (click) 258384 196104 21 569 0 0% 0 0 14.426032
addressable-normalize (click) 312418 279807 43 1327 1 0% 0 0 32.82643
addressable-parse (click) 280436 229954 26 880 0 0% 0 0 21.786065
addressable-setters (click) 257526 230253 20 582 0 0% 0 0 14.552606
addressable-to-s (click) 279197 204770 26 889 0 0% 0 0 21.665358
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.815849
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.119358
erubi (click) 248439 247333 6 134 0 0% 0 0 3.902508
etanni (click) 32900 34696 8 114 0 0% 0 0 3.455812
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.050108
fluentd (click) 487528 435803 7 116 0 0% 0 0 3.734008
graphql (click) 409820 374454 73 1909 19 0% 0 0 53.3303
graphql-native (click) 354515 291964 39 532 0 0% 0 0 14.198656
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.917239
lee (click) 318016 245251 49 1099 0 0% 0 0 31.073367
matmul (click) 11103 4709 8 136 0 0% 0 0 4.186859
nbody (click) 14448 21176 6 251 0 0% 0 0 6.104633
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.347497
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.431334
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.217159
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.263545
rack (click) 284329 284869 35 586 0 0% 0 0 15.353523
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.740891
rubyboy (click) 706637 640695 154 6873 42 0% 0 0 169.015981
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.613327
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.117171
tinygql (click) 300490 254870 59 1031 5 0% 0 0 27.613841
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1963.165823
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.051851
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.078474
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.53101
fib (click) 2659 2995 3 30 0 0% 0 0 1.156235
getivar (click) 3789 6778 3 79 0 0% 0 0 1.918319
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.325325
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.809666
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.947186
object-new (click) 2406 2818 2 36 0 0% 0 0 1.069054
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.153507
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.850804
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.816412
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.833844
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.504445
setivar (click) 2783 3726 3 46 0 0% 0 0 1.291467
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.41493
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.681715
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.417418
structaref (click) 4407 9095 3 88 0 0% 0 0 2.33944
structaset (click) 4113 5834 3 70 0 0% 0 0 1.791696
throw (click) 5953 4624 5 53 0 0% 0 0 1.746731

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.