Ruby Benchmarks

Details for Benchmarks at 2026-02-28 00:46:18 UTC

YJIT metrics from the ruby-bench suite using Ruby 8fb5df2610.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.7% faster than CRuby 4.1.0dev
  • 6.5% faster than YJIT 3.4.7
On railsbench it is
  • 111.2% faster than CRuby 4.1.0dev
  • 12.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 16 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 92 5 99 50 203 50 243
chunky-png 5 31 5 31 50 33 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 433 50 625 50 652
liquid-compile 5 415 5 478 50 580 50 744
liquid-render 5 170 5 174 50 436 50 450
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 197 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 155 5 161 50 249 50 254
ruby-lsp 5 164 5 165 50 228 50 235
sequel 5 426 5 433 50 599 50 616
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 15
addressable-getters 5 164 5 173 50 183 50 203
addressable-join 5 73 5 81 50 63 50 75
addressable-merge 5 160 5 164 50 222 50 228
addressable-new 5 348 5 363 50 512 50 538
addressable-normalize 5 54 5 56 50 59 50 64
addressable-parse 5 104 5 107 50 104 50 114
addressable-setters 5 183 5 190 50 230 50 241
addressable-to-s 5 163 5 173 50 182 50 201
binarytrees 5 82 5 86 50 136 50 148
blurhash 5 83 5 88 50 143 50 145
erubi 5 133 5 149 50 139 50 149
etanni 5 98 5 72 50 71 50 39
fannkuchredux 5 54 5 57 50 102 50 104
fluentd 5 56 5 64 50 22 50 31
graphql 5 372 5 469 50 535 50 963
graphql-native 5 59 5 89 50 22 50 67
knucleotide 5 163 5 162 50 118 50 116
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 95 50 96
nbody 5 246 5 274 50 676 50 700
nqueens 5 116 5 129 50 556 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 182 50 707 50 748
protoboeuf-encode 5 197 5 203 50 833 50 815
rack 5 440 5 467 50 708 50 735
ruby-json 5 82 5 103 50 47 50 74
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 42 5 43 50 34 50 51
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 40 50 455 50 456
attr_accessor 5 157 5 195 50 1834 50 1918
cfunc_itself 5 348 5 349 50 1255 50 1259
fib 5 124 5 129 50 939 50 939
getivar 5 216 5 293 50 2315 50 2407
getivar-module 5 104 5 124 50 90 50 260
keyword_args 5 100 5 100 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 62
object-new 5 268 5 413 50 296 50 918
respond_to 5 139 5 138 50 3897 50 3902
ruby-xor 5 236 5 224 50 1313 50 1296
send_bmethod 5 116 5 123 50 5538 50 4526
send_cfunc_block 5 106 5 106 50 353 50 384
send_rubyfunc_block 5 250 5 247 50 6924 50 6916
setivar 5 359 5 435 50 4921 50 5010
setivar_object 5 341 5 300 50 750 50 626
setivar_young 5 341 5 303 50 800 50 651
str_concat 5 391 5 459 50 1203 50 1165
structaref 5 157 5 190 50 1811 50 1883
structaset 5 202 5 236 50 397 50 492
throw 5 1088 5 1409 50 1424 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) 1551839 1357206 203 2651 0 0% 0 0 75.204501
chunky-png (click) 321430 287858 79 1376 1 0% 0 0 38.901436
erubi-rails (click) 1382350 1228679 268 3715 22 0% 0 0 100.034302
hexapdf (click) 1524030 1327772 594 15718 44 0% 0 0 438.900775
liquid-c (click) 558154 479651 114 2236 5 0% 0 0 59.064726
liquid-compile (click) 478843 429758 146 2694 2 0% 0 0 78.236448
liquid-render (click) 665993 555747 131 2959 8 0% 0 0 79.670239
lobsters (click) 8687716 7331786 3124 64109 122 0% 0 0 2110.502268
mail (click) 869782 811717 345 7717 39 0% 0 0 213.084445
psych-load (click) 288588 224532 61 831 2 0% 0 0 23.753609
railsbench (click) 3349995 2914897 1592 19760 97 0% 0 0 554.698953
rubocop (click) 5781268 5086740 3003 57102 126 0% 6 0 1663.577008
ruby-lsp (click) 1039085 893501 408 7446 46 0% 1 0 203.676069
sequel (click) 503021 422080 11 119 0 0% 0 0 3.94204
shipit (click) 7139652 6021780 3298 52253 169 0% 0 0 1728.917746
addressable-equality (click) 317246 276757 44 1380 1 0% 0 0 34.180485
addressable-getters (click) 275290 233522 26 863 0 0% 0 0 20.968095
addressable-join (click) 287538 250289 24 1005 0 0% 0 0 25.808777
addressable-merge (click) 282984 255346 27 896 0 0% 0 0 22.06111
addressable-new (click) 257960 228451 21 563 0 0% 0 0 14.076507
addressable-normalize (click) 315606 283459 43 1371 1 0% 0 0 33.701557
addressable-parse (click) 279257 236281 26 880 0 0% 0 0 21.707352
addressable-setters (click) 256971 204286 20 582 0 0% 0 0 14.350294
addressable-to-s (click) 276153 233365 26 849 0 0% 0 0 20.427955
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.804305
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.209455
erubi (click) 247256 212658 6 134 0 0% 0 0 3.999664
etanni (click) 33355 27108 8 114 0 0% 0 0 3.464537
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.036601
fluentd (click) 488259 436614 7 116 0 0% 0 0 3.710305
graphql (click) 409243 389469 73 1909 19 0% 0 0 52.939023
graphql-native (click) 352474 322278 39 532 0 0% 0 0 14.126929
knucleotide (click) 9939 10477 7 110 0 0% 0 0 5.005979
lee (click) 317928 253385 49 1099 0 0% 0 0 31.094786
matmul (click) 11103 4709 8 136 0 0% 0 0 4.222825
nbody (click) 14448 21176 6 251 0 0% 0 0 6.116152
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.375409
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.272394
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.363879
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.386856
rack (click) 283854 251660 35 581 0 0% 0 0 14.958064
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.729023
rubyboy (click) 705701 630980 154 6871 42 0% 0 0 167.929535
rubykon (click) 148683 164130 138 2104 4 0% 0 0 57.038914
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.036461
tinygql (click) 300035 278282 59 1031 5 0% 0 0 26.920056
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1949.652089
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.851433
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.071032
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.47973
fib (click) 2659 2995 3 30 0 0% 0 0 1.110072
getivar (click) 3789 6778 3 79 0 0% 0 0 1.898948
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.305161
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.82105
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.912088
object-new (click) 2406 2818 2 36 0 0% 0 0 1.094189
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.102442
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.808525
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.802677
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.7338
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.477396
setivar (click) 2783 3726 3 46 0 0% 0 0 1.255692
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.421078
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.717932
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.423496
structaref (click) 4407 9095 3 88 0 0% 0 0 2.301525
structaset (click) 4113 5834 3 70 0 0% 0 0 1.785625
throw (click) 5953 4624 5 53 0 0% 0 0 1.787636

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.