Ruby Benchmarks

Details for Benchmarks at 2026-02-23 00:53:33 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.2% faster than CRuby 4.1.0dev
  • 6.2% faster than YJIT 3.4.7
On railsbench it is
  • 115.6% faster than CRuby 4.1.0dev
  • 12.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 24 minutes
aarch64 runtime: 7 hours, 18 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 98 50 194 50 238
chunky-png 5 31 5 33 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 430 50 629 50 641
liquid-compile 5 419 5 481 50 583 50 707
liquid-render 5 173 5 174 50 434 50 449
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 198 50 252 50 275
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 160 50 248 50 253
ruby-lsp 5 161 5 164 50 231 50 234
sequel 5 421 5 441 50 587 50 617
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 163 5 175 50 183 50 204
addressable-join 5 73 5 81 50 64 50 75
addressable-merge 5 159 5 162 50 221 50 231
addressable-new 5 353 5 358 50 521 50 543
addressable-normalize 5 53 5 55 50 59 50 65
addressable-parse 5 103 5 107 50 104 50 116
addressable-setters 5 184 5 189 50 230 50 242
addressable-to-s 5 165 5 172 50 183 50 206
binarytrees 5 82 5 86 50 136 50 148
blurhash 5 83 5 85 50 143 50 145
erubi 5 128 5 148 50 134 50 146
etanni 5 98 5 72 50 71 50 38
fannkuchredux 5 54 5 57 50 102 50 104
fluentd 5 61 5 63 50 20 50 31
graphql 5 372 5 467 50 573 50 966
graphql-native 5 58 5 85 50 23 50 71
knucleotide 5 162 5 160 50 118 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 96
nbody 5 246 5 295 50 676 50 700
nqueens 5 116 5 126 50 556 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 182 50 707 50 769
protoboeuf-encode 5 197 5 199 50 833 50 796
rack 5 438 5 463 50 713 50 728
ruby-json 5 82 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 168
tinygql 5 41 5 43 50 36 50 52
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 450 50 453
attr_accessor 5 157 5 193 50 1834 50 1912
cfunc_itself 5 350 5 354 50 1255 50 1259
fib 5 123 5 139 50 939 50 939
getivar 5 216 5 331 50 2318 50 2435
getivar-module 5 104 5 143 50 90 50 272
keyword_args 5 100 5 102 50 1240 50 1242
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 411 50 298 50 900
respond_to 5 139 5 139 50 3891 50 3901
ruby-xor 5 236 5 253 50 1314 50 1299
send_bmethod 5 116 5 124 50 5538 50 4527
send_cfunc_block 5 106 5 103 50 353 50 382
send_rubyfunc_block 5 250 5 252 50 6925 50 6930
setivar 5 359 5 481 50 4923 50 5044
setivar_object 5 341 5 305 50 714 50 641
setivar_young 5 341 5 308 50 799 50 660
str_concat 5 391 5 456 50 1202 50 1176
structaref 5 156 5 203 50 1812 50 1890
structaset 5 203 5 268 50 397 50 501
throw 5 1088 5 1451 50 1405 50 1891

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) 1553384 1334393 203 2672 0 0% 0 0 76.766491
chunky-png (click) 319764 285663 79 1376 1 0% 0 0 39.083498
erubi-rails (click) 1375799 1197355 268 3626 22 0% 0 0 97.331113
hexapdf (click) 1522132 1300767 593 15710 44 0% 0 0 439.276282
liquid-c (click) 558951 488986 114 2236 5 0% 0 0 59.228878
liquid-compile (click) 479262 454576 146 2697 2 0% 0 0 77.784232
liquid-render (click) 664112 585733 131 2959 8 0% 0 0 79.264064
lobsters (click) 8701425 7443378 3124 64222 120 0% 0 0 2119.359789
mail (click) 872018 814654 345 7730 40 0% 0 0 213.921928
psych-load (click) 288632 265521 61 831 2 0% 0 0 24.356465
railsbench (click) 3358760 2801547 1592 19768 97 0% 0 0 555.583456
rubocop (click) 5782170 5079855 3002 57121 126 0% 6 0 1668.826004
ruby-lsp (click) 1040932 862028 409 7484 47 0% 1 0 206.572873
sequel (click) 500686 402856 11 119 0 0% 0 0 3.90851
shipit (click) 7148597 6004197 3298 52199 169 0% 0 0 1717.084763
addressable-equality (click) 316255 275234 44 1387 1 0% 0 0 34.432876
addressable-getters (click) 277784 203595 26 865 0 0% 0 0 21.20574
addressable-join (click) 275783 253664 24 941 0 0% 0 0 23.529382
addressable-merge (click) 283285 247533 27 898 0 0% 0 0 22.469707
addressable-new (click) 257863 236524 21 563 0 0% 0 0 14.168823
addressable-normalize (click) 314301 257311 43 1352 1 0% 0 0 33.66321
addressable-parse (click) 276515 258231 26 880 0 0% 0 0 21.684322
addressable-setters (click) 244992 207806 20 584 0 0% 0 0 14.749223
addressable-to-s (click) 277231 202338 26 849 0 0% 0 0 20.708924
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.813892
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.322978
erubi (click) 246768 220495 6 134 0 0% 0 0 3.918406
etanni (click) 33355 27108 8 114 0 0% 0 0 3.45605
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.101909
fluentd (click) 487528 444064 7 116 0 0% 0 0 3.766059
graphql (click) 410336 391265 73 1909 19 0% 0 0 53.132363
graphql-native (click) 350058 336054 39 532 0 0% 0 0 13.916792
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.579036
lee (click) 317627 269512 49 1099 0 0% 0 0 31.404311
matmul (click) 11103 4709 8 136 0 0% 0 0 4.246844
nbody (click) 14448 21176 6 251 0 0% 0 0 6.066361
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.369159
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.769027
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.377089
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.450368
rack (click) 287311 255113 35 656 0 0% 0 0 17.033621
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.682529
rubyboy (click) 703483 661579 154 6871 42 0% 0 0 166.999454
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.671812
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.114464
tinygql (click) 299437 277720 59 1031 5 0% 0 0 27.263803
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1959.776151
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.43558
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.079804
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.507097
fib (click) 2659 2995 3 30 0 0% 0 0 1.103867
getivar (click) 3789 6778 3 79 0 0% 0 0 1.923048
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.290669
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.845507
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.940268
object-new (click) 2406 2818 2 36 0 0% 0 0 1.091035
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.101567
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.825494
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.811187
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.814723
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.470374
setivar (click) 2783 3726 3 46 0 0% 0 0 1.26253
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.430219
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.70764
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.445643
structaref (click) 4407 9095 3 88 0 0% 0 0 2.313493
structaset (click) 4113 5834 3 70 0 0% 0 0 1.794466
throw (click) 5953 4624 5 53 0 0% 0 0 1.760536

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.