Ruby Benchmarks

Details for Benchmarks at 2026-02-04 00:48:47 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.2% faster than CRuby 4.1.0dev
  • 6.6% faster than YJIT 3.4.7
On railsbench it is
  • 117.7% faster than CRuby 4.1.0dev
  • 11.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 2 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 99 50 188 50 237
chunky-png 5 31 5 32 50 33 50 30
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 429 50 622 50 643
liquid-compile 5 419 5 481 50 581 50 739
liquid-render 5 172 5 173 50 437 50 446
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 191 50 253 50 268
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 248 50 253
ruby-lsp 5 157 5 163 50 238 50 234
sequel 5 422 5 443 50 573 50 609
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 164 5 172 50 184 50 200
addressable-join 5 73 5 76 50 66 50 71
addressable-merge 5 160 5 159 50 222 50 222
addressable-new 5 353 5 359 50 524 50 541
addressable-normalize 5 53 5 54 50 59 50 61
addressable-parse 5 104 5 106 50 104 50 112
addressable-setters 5 184 5 187 50 228 50 241
addressable-to-s 5 163 5 171 50 183 50 198
binarytrees 5 82 5 87 50 136 50 146
blurhash 5 83 5 87 50 143 50 145
erubi 5 138 5 151 50 136 50 154
etanni 5 98 5 73 50 71 50 39
fannkuchredux 5 54 5 57 50 102 50 105
fluentd 5 56 5 66 50 22 50 32
graphql 5 370 5 459 50 572 50 923
graphql-native 5 59 5 88 50 21 50 68
knucleotide 5 163 5 160 50 117 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 57 50 95 50 97
nbody 5 246 5 285 50 677 50 630
nqueens 5 116 5 127 50 555 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 176 50 706 50 717
protoboeuf-encode 5 197 5 206 50 834 50 829
rack 5 436 5 464 50 705 50 726
ruby-json 5 84 5 101 50 46 50 73
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 159
tinygql 5 41 5 43 50 35 50 49
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 450 50 456
attr_accessor 5 157 5 200 50 1833 50 1927
cfunc_itself 5 349 5 359 50 1255 50 1259
fib 5 124 5 147 50 940 50 939
getivar 5 217 5 299 50 2316 50 2409
getivar-module 5 104 5 130 50 90 50 266
keyword_args 5 100 5 97 50 1240 50 1242
loops-times 5 20 5 25 50 64 50 61
object-new 5 268 5 384 50 297 50 769
respond_to 5 139 5 138 50 3891 50 3904
ruby-xor 5 236 5 254 50 1312 50 1282
send_bmethod 5 116 5 124 50 5539 50 4527
send_cfunc_block 5 106 5 105 50 353 50 344
send_rubyfunc_block 5 251 5 254 50 6923 50 6922
setivar 5 359 5 481 50 4924 50 5043
setivar_object 5 341 5 304 50 750 50 643
setivar_young 5 341 5 307 50 798 50 662
str_concat 5 390 5 452 50 1201 50 1159
structaref 5 157 5 206 50 1811 50 1889
structaset 5 202 5 246 50 397 50 497
throw 5 1091 5 1348 50 1419 50 1632

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) 1544715 1331083 203 2625 0 0% 0 0 75.406892
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 39.399383
erubi-rails (click) 1370105 1155448 268 3640 22 0% 0 0 98.087603
hexapdf (click) 1523389 1306215 593 15681 44 0% 0 0 440.660095
liquid-c (click) 557534 505618 114 2231 5 0% 0 0 59.695343
liquid-compile (click) 480600 457139 146 2712 2 0% 0 0 80.148502
liquid-render (click) 664327 580773 131 2950 8 0% 0 0 79.826078
lobsters (click) 8696714 7404154 3123 64141 117 0% 0 0 2120.066917
mail (click) 865429 834893 345 7700 40 0% 0 0 214.917982
psych-load (click) 287997 273652 61 829 2 0% 0 0 23.932072
railsbench (click) 3341805 2876021 1591 19715 97 0% 0 0 556.253658
rubocop (click) 5774931 4932711 3002 57020 125 0% 6 0 1678.456602
ruby-lsp (click) 1039475 851664 408 7395 46 0% 1 0 206.347022
sequel (click) 502313 414450 11 119 0 0% 0 0 3.991767
shipit (click) 7461562 6369658 3439 55707 174 0% 1 0 1856.988241
addressable-equality (click) 317620 285895 44 1391 1 0% 0 0 34.825901
addressable-getters (click) 277401 219850 26 863 0 0% 0 0 21.181638
addressable-join (click) 282677 244588 24 941 0 0% 0 0 23.571582
addressable-merge (click) 282708 247146 27 896 0 0% 0 0 22.442201
addressable-new (click) 257539 228270 21 563 0 0% 0 0 14.221894
addressable-normalize (click) 313841 273407 43 1345 1 0% 0 0 33.58931
addressable-parse (click) 279493 262251 26 880 0 0% 0 0 21.617037
addressable-setters (click) 257207 246640 20 582 0 0% 0 0 14.425878
addressable-to-s (click) 276911 235049 26 849 0 0% 0 0 20.733164
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.844236
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.181017
erubi (click) 247678 230981 6 132 0 0% 0 0 3.906931
etanni (click) 32382 26816 8 111 0 0% 0 0 3.439065
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.158209
fluentd (click) 486593 411818 7 115 0 0% 0 0 3.748686
graphql (click) 408576 383602 73 1895 19 1% 0 0 53.575936
graphql-native (click) 353042 325590 39 532 0 0% 0 0 14.379092
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.888688
lee (click) 316896 295213 49 1088 0 0% 0 0 31.575409
matmul (click) 11103 4709 8 136 0 0% 0 0 4.241461
nbody (click) 14448 21176 6 251 0 0% 0 0 6.181415
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.401935
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.986459
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.05533
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.404681
rack (click) 282632 260019 35 627 0 0% 0 0 16.53256
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.716369
rubyboy (click) 706201 632644 154 6875 42 0% 0 0 168.935402
rubykon (click) 150359 159173 138 2126 4 0% 0 0 58.099686
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.304145
tinygql (click) 299885 246275 59 1025 5 0% 0 0 27.315477
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1954.374864
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.958957
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.078326
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.515646
fib (click) 2659 2995 3 30 0 0% 0 0 1.123168
getivar (click) 3789 6778 3 79 0 0% 0 0 1.944302
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.316228
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.814925
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.967602
object-new (click) 2406 2818 2 36 0 0% 0 0 1.035192
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.182778
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.794505
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.848244
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.147779
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.442414
setivar (click) 2783 3726 3 46 0 0% 0 0 1.278113
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.421957
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.720164
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.422715
structaref (click) 4407 9095 3 88 0 0% 0 0 2.374521
structaset (click) 4113 5834 3 70 0 0% 0 0 1.778939
throw (click) 5953 4624 5 53 0 0% 0 0 1.755545

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.