Ruby Benchmarks

Details for Benchmarks at 2026-02-16 00:53:36 UTC

YJIT metrics from the ruby-bench suite using Ruby 99674185d6.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.1% faster than CRuby 4.1.0dev
  • 5.6% faster than YJIT 3.4.7
On railsbench it is
  • 118.6% faster than CRuby 4.1.0dev
  • 11.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 11 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 98 50 199 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 421 5 433 50 630 50 641
liquid-compile 5 416 5 476 50 582 50 733
liquid-render 5 171 5 177 50 433 50 449
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 195 50 252 50 270
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 248 50 251
ruby-lsp 5 159 5 164 50 233 50 232
sequel 5 420 5 436 50 602 50 628
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 164 5 171 50 184 50 199
addressable-join 5 74 5 78 50 63 50 70
addressable-merge 5 159 5 158 50 221 50 222
addressable-new 5 352 5 356 50 517 50 529
addressable-normalize 5 54 5 53 50 59 50 60
addressable-parse 5 104 5 107 50 103 50 109
addressable-setters 5 183 5 185 50 229 50 238
addressable-to-s 5 163 5 172 50 183 50 202
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 86 50 143 50 145
erubi 5 132 5 149 50 138 50 146
etanni 5 98 5 74 50 71 50 41
fannkuchredux 5 55 5 57 50 102 50 100
fluentd 5 56 5 63 50 20 50 26
graphql 5 372 5 474 50 528 50 931
graphql-native 5 59 5 86 50 21 50 64
knucleotide 5 163 5 160 50 117 50 113
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 97
nbody 5 246 5 298 50 677 50 704
nqueens 5 116 5 129 50 556 50 577
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 188 50 707 50 770
protoboeuf-encode 5 197 5 209 50 830 50 817
rack 5 439 5 458 50 717 50 722
ruby-json 5 81 5 102 50 47 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 158
tinygql 5 42 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 455 50 455
attr_accessor 5 157 5 204 50 1834 50 1931
cfunc_itself 5 350 5 370 50 1255 50 1259
fib 5 124 5 143 50 940 50 940
getivar 5 217 5 327 50 2311 50 2429
getivar-module 5 104 5 141 50 90 50 270
keyword_args 5 94 5 102 50 1240 50 1242
loops-times 5 23 5 27 50 64 50 62
object-new 5 268 5 415 50 298 50 920
respond_to 5 139 5 141 50 3888 50 3902
ruby-xor 5 236 5 257 50 1314 50 1287
send_bmethod 5 117 5 126 50 5539 50 4527
send_cfunc_block 5 101 5 106 50 353 50 380
send_rubyfunc_block 5 250 5 250 50 6923 50 6927
setivar 5 359 5 482 50 4923 50 5045
setivar_object 5 341 5 302 50 750 50 549
setivar_young 5 341 5 302 50 798 50 564
str_concat 5 390 5 459 50 1200 50 1190
structaref 5 156 5 200 50 1813 50 1888
structaset 5 202 5 249 50 396 50 497
throw 5 1090 5 1433 50 1419 50 1912

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) 1552923 1350181 203 2651 0 0% 0 0 75.022576
chunky-png (click) 320589 294555 79 1376 1 0% 0 0 39.129021
erubi-rails (click) 1375290 1147541 268 3636 22 0% 0 0 96.197294
hexapdf (click) 1527598 1274392 593 15730 44 0% 0 0 435.080723
liquid-c (click) 558820 497063 114 2236 5 0% 0 0 58.979005
liquid-compile (click) 479198 430534 146 2705 2 0% 0 0 78.796075
liquid-render (click) 665649 563271 131 2959 8 0% 0 0 79.500605
lobsters (click) 8677444 7319798 3125 63923 119 0% 0 0 2096.392804
mail (click) 871410 838642 345 7728 40 0% 0 0 211.943955
psych-load (click) 288353 265313 61 831 2 0% 0 0 24.284765
railsbench (click) 3350745 2882182 1592 19743 97 0% 0 0 549.850423
rubocop (click) 5781011 4988886 3002 57130 126 0% 6 0 1662.477046
ruby-lsp (click) 1042254 978270 409 7472 47 0% 1 0 203.33577
sequel (click) 504745 407337 11 119 0 0% 0 0 3.869615
addressable-equality (click) 317109 260313 44 1380 1 0% 0 0 34.194921
addressable-getters (click) 275759 217416 26 863 0 0% 0 0 20.942857
addressable-join (click) 282997 220069 24 941 0 0% 0 0 23.118864
addressable-merge (click) 282844 238902 27 896 0 0% 0 0 21.782393
addressable-new (click) 261574 239787 21 633 0 0% 0 0 15.569538
addressable-normalize (click) 314253 257028 43 1346 1 0% 0 0 33.216908
addressable-parse (click) 280960 238892 26 894 0 0% 0 0 22.06719
addressable-setters (click) 257308 237444 20 582 0 0% 0 0 14.438801
addressable-to-s (click) 276951 234878 26 849 0 0% 0 0 20.434407
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.836576
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.028082
erubi (click) 249861 206426 6 134 0 0% 0 0 3.872321
etanni (click) 33355 27108 8 114 0 0% 0 0 3.424456
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.037385
fluentd (click) 487624 435893 7 116 0 0% 0 0 3.682144
graphql (click) 409561 381583 73 1909 19 0% 0 0 53.305441
graphql-native (click) 354036 258015 39 532 0 0% 0 0 14.055149
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.923204
lee (click) 317540 252194 49 1102 0 0% 0 0 31.260007
matmul (click) 11103 4709 8 136 0 0% 0 0 4.212205
nbody (click) 14448 21176 6 251 0 0% 0 0 6.134619
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.360241
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.246918
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.269115
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.870244
rack (click) 283575 251464 35 581 0 0% 0 0 14.938122
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.646626
rubyboy (click) 704303 662259 154 6871 42 0% 0 0 166.743915
rubykon (click) 148777 155950 138 2107 4 0% 0 0 56.385799
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.016861
tinygql (click) 300579 287619 59 1025 5 0% 0 0 26.917571
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1938.093564
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 488.019258
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.076448
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.492094
fib (click) 2659 2995 3 30 0 0% 0 0 1.116645
getivar (click) 3789 6778 3 79 0 0% 0 0 1.921511
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.338205
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.850413
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.933614
object-new (click) 2406 2818 2 36 0 0% 0 0 1.115119
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.165455
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.820254
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.799127
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.7607
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.450232
setivar (click) 2783 3726 3 46 0 0% 0 0 1.2655
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.398316
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.716562
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.450075
structaref (click) 4407 9095 3 88 0 0% 0 0 2.335267
structaset (click) 4113 5834 3 70 0 0% 0 0 1.769773
throw (click) 5953 4624 5 53 0 0% 0 0 1.828143

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.