Ruby Benchmarks

Details for Benchmarks at 2026-04-29 01:11:19 UTC

YJIT metrics from the ruby-bench suite using Ruby 1c39cc8115.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.3% faster than CRuby 4.1.0dev
  • 7.4% faster than YJIT 3.4.7
On railsbench it is
  • 117.2% faster than CRuby 4.1.0dev
  • 13.9% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 minutes
aarch64 runtime: 7 hours, 49 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 94 50 199 50 238
chunky-png 5 32 5 31 50 34 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 437 50 623 50 663
liquid-compile 5 417 5 480 50 581 50 748
liquid-render 5 172 5 171 50 433 50 461
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 199 50 254 50 286
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 152 50 247 50 253
ruby-lsp 5 163 5 163 50 239 50 228
sequel 5 424 5 449 50 596 50 630
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 165 5 167 50 184 50 194
addressable-join 5 75 5 79 50 66 50 72
addressable-merge 5 161 5 152 50 223 50 220
addressable-new 5 354 5 337 50 519 50 515
addressable-normalize 5 52 5 54 50 60 50 59
addressable-parse 5 103 5 103 50 103 50 110
addressable-setters 5 184 5 175 50 233 50 232
addressable-to-s 5 164 5 165 50 181 50 194
binarytrees 5 81 5 86 50 136 50 169
blurhash 5 84 5 84 50 145 50 145
erubi 5 137 5 149 50 121 50 151
etanni 5 100 5 81 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 104
fluentd 5 62 5 59 50 21 50 30
gcbench 5 10 5 10 50 10 50 15
graphql 5 373 5 446 50 564 50 954
graphql-native 5 57 5 89 50 22 50 72
knucleotide 5 163 5 144 50 117 50 97
lee 5 23 5 30 50 10 50 15
matmul 5 53 5 56 50 88 50 93
nbody 5 250 5 279 50 663 50 662
nqueens 5 119 5 116 50 554 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 184 50 697 50 822
protoboeuf-encode 5 199 5 191 50 808 50 832
rack 5 442 5 444 50 723 50 740
ruby-json 5 84 5 108 50 50 50 86
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 208 5 228 50 250 50 286
sudoku 5 48 5 48 50 155 50 157
tinygql 5 40 5 42 50 40 50 53
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 453 50 458
attr_accessor 5 157 5 181 50 1832 50 1895
cfunc_itself 5 335 5 326 50 1255 50 1259
fib 5 125 5 132 50 939 50 939
getivar 5 211 5 299 50 2305 50 2411
getivar-module 5 103 5 136 50 89 50 268
keyword_args 5 102 5 101 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 472 50 298 50 1516
object-new-initialize 5 168 5 256 50 260 50 1016
object-new-no-escape 5 80 5 122 50 89 50 513
respond_to 5 139 5 126 50 3902 50 3870
ruby-xor 5 247 5 226 50 1305 50 1309
send_bmethod 5 118 5 117 50 5539 50 4526
send_cfunc_block 5 106 5 106 50 304 50 281
send_rubyfunc_block 5 196 5 211 50 1372 50 1376
setivar 5 359 5 473 50 4930 50 5040
setivar_object 5 341 5 348 50 760 50 655
setivar_young 5 344 5 348 50 809 50 694
str_concat 5 391 5 452 50 1201 50 1169
structaref 5 153 5 183 50 1798 50 1863
structaset 5 198 5 221 50 370 50 475
throw 5 1109 5 1406 50 1442 50 1712

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) 1560916 1314059 203 2657 0 0% 0 0 73.087593
chunky-png (click) 324152 305626 79 1376 1 0% 0 0 37.986257
erubi-rails (click) 1386392 1229620 268 3665 23 0% 0 0 95.045639
hexapdf (click) 1535182 1321456 593 15797 44 0% 0 0 426.566256
liquid-c (click) 565604 467825 114 2247 5 0% 0 0 58.706511
liquid-compile (click) 486804 491944 146 2749 2 0% 0 0 85.453474
liquid-render (click) 671552 656251 131 2963 8 0% 0 0 77.458046
lobsters (click) 8586178 7336851 3126 63807 122 0% 0 0 2094.984782
mail (click) 875121 799946 345 7738 40 0% 0 0 208.120003
psych-load (click) 291122 242157 61 833 2 0% 0 0 23.634222
railsbench (click) 3360709 2818867 1592 19746 104 0% 0 0 532.186436
rubocop (click) 5795895 4994569 3002 57272 128 0% 6 0 1645.803986
ruby-lsp (click) 1045991 849517 409 7472 47 0% 1 0 199.224489
sequel (click) 506817 473935 11 121 0 0% 0 0 5.620917
shipit (click) 7214979 6013154 3118 50214 148 0% 0 0 1601.162951
addressable-equality (click) 321536 304711 44 1406 1 0% 0 0 36.165348
addressable-getters (click) 279992 221055 26 863 0 0% 0 0 20.81005
addressable-join (click) 286556 246946 24 945 0 0% 0 0 24.094832
addressable-merge (click) 286544 265915 27 900 0 0% 0 0 24.082619
addressable-new (click) 262529 248859 21 569 0 0% 0 0 14.473331
addressable-normalize (click) 317308 267477 43 1352 1 0% 0 0 34.321961
addressable-parse (click) 283776 256690 26 886 0 0% 0 0 22.379791
addressable-setters (click) 260943 199667 20 588 0 0% 0 0 15.710243
addressable-to-s (click) 270994 201856 26 849 0 0% 0 0 20.982846
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.747149
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.925582
erubi (click) 251950 200403 6 134 0 0% 0 0 3.909166
etanni (click) 32989 26478 8 114 0 0% 0 0 3.402343
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.803541
fluentd (click) 488970 427194 7 116 0 0% 0 0 3.65655
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.59196
graphql (click) 413908 359974 73 1931 19 0% 0 0 52.281019
graphql-native (click) 357320 341994 39 532 0 0% 0 0 13.917293
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.718974
lee (click) 320828 263144 49 1099 0 0% 0 0 30.251029
matmul (click) 11103 4709 8 136 0 0% 0 0 4.073768
nbody (click) 14448 21176 6 251 0 0% 0 0 6.092099
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.168419
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.350492
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.464713
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.166129
rack (click) 282368 274134 35 656 0 0% 0 0 18.16282
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.80551
rubyboy (click) 706751 655871 154 6875 42 0% 0 0 162.001399
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.151326
splay (click) 34953 22682 9 175 0 0% 0 0 5.254909
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.728034
tinygql (click) 303957 273162 59 1032 5 0% 0 0 26.440754
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1852.01438
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 471.626878
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.061291
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.487866
fib (click) 2659 2995 3 30 0 0% 0 0 1.097918
getivar (click) 3789 6778 3 79 0 0% 0 0 1.906439
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.345289
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818539
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.919896
object-new (click) 2406 2818 2 36 0 0% 0 0 0.975323
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.27215
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.958274
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.125215
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799913
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.790741
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.283716
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.754959
setivar (click) 2783 3726 3 46 0 0% 0 0 1.243597
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.394191
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.707161
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.375302
structaref (click) 4407 9095 3 88 0 0% 0 0 2.328129
structaset (click) 4113 5834 3 70 0 0% 0 0 1.849105
throw (click) 5953 4624 5 53 0 0% 0 0 1.739112

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.