Ruby Benchmarks

Details for Benchmarks at 2026-01-18 00:47:08 UTC

YJIT metrics from the ruby-bench suite using Ruby 00a3b71eaf.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.8% faster than CRuby 4.1.0dev
  • 4.3% faster than YJIT 3.4.7
On railsbench it is
  • 113.2% faster than CRuby 4.1.0dev
  • 12.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 17 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 92 5 97 50 204 50 235
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 419 5 430 50 629 50 618
liquid-compile 5 418 5 473 50 583 50 697
liquid-render 5 172 5 174 50 435 50 436
mail 5 194 5 191 50 254 50 260
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 247 50 250
ruby-lsp 5 157 5 162 50 225 50 231
sequel 5 418 5 421 50 603 50 588
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 169 50 183 50 194
addressable-join 5 74 5 75 50 66 50 68
addressable-merge 5 161 5 154 50 222 50 216
addressable-new 5 351 5 349 50 525 50 504
addressable-normalize 5 53 5 52 50 59 50 57
addressable-parse 5 103 5 103 50 103 50 105
addressable-setters 5 185 5 179 50 230 50 222
addressable-to-s 5 163 5 168 50 183 50 188
binarytrees 5 82 5 81 50 136 50 128
blurhash 5 83 5 87 50 143 50 145
erubi 5 136 5 143 50 121 50 148
etanni 5 98 5 70 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 102
fluentd 5 56 5 61 50 20 50 32
graphql 5 359 5 457 50 531 50 907
graphql-native 5 58 5 86 50 23 50 69
knucleotide 5 163 5 155 50 117 50 109
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 56 50 94 50 95
nbody 5 247 5 266 50 676 50 663
nqueens 5 116 5 129 50 556 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 736
protoboeuf-encode 5 197 5 206 50 831 50 793
rack 5 440 5 442 50 717 50 682
ruby-json 5 81 5 98 50 46 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 156 50 155
tinygql 5 41 5 44 50 40 50 48
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 455 50 458
attr_accessor 5 158 5 218 50 1836 50 1952
cfunc_itself 5 348 5 346 50 1255 50 1259
fib 5 123 5 146 50 939 50 940
getivar 5 208 5 334 50 2314 50 2437
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 104 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 61
object-new 5 268 5 366 50 299 50 683
respond_to 5 139 5 135 50 3894 50 3905
ruby-xor 5 237 5 251 50 1314 50 1291
send_bmethod 5 116 5 123 50 5539 50 4528
send_cfunc_block 5 106 5 107 50 353 50 341
send_rubyfunc_block 5 250 5 243 50 6921 50 6925
setivar 5 361 5 486 50 4926 50 5046
setivar_object 5 341 5 303 50 714 50 628
setivar_young 5 342 5 307 50 794 50 649
str_concat 5 393 5 469 50 1198 50 1212
structaref 5 156 5 230 50 1812 50 1935
structaset 5 201 5 268 50 395 50 487
throw 5 1085 5 1249 50 1420 50 1559

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) 1544295 1362607 203 2636 0 0% 0 0 76.24503
chunky-png (click) 320680 312345 79 1374 1 0% 0 0 39.44171
erubi-rails (click) 1370716 1189037 268 3713 22 0% 0 0 99.438589
hexapdf (click) 1521772 1287768 594 15674 44 0% 0 0 438.583779
liquid-c (click) 558094 522337 114 2231 5 0% 0 0 59.095078
liquid-compile (click) 478760 438836 146 2698 2 0% 0 0 78.789979
liquid-render (click) 666156 631282 131 2950 8 0% 0 0 79.379462
mail (click) 867205 853027 345 7700 40 0% 0 0 212.598845
psych-load (click) 287751 281596 61 829 2 0% 0 0 23.737192
railsbench (click) 3345622 2856580 1591 19728 97 0% 0 0 553.488714
rubocop (click) 5756229 5000827 3002 56846 126 0% 6 0 1665.27604
ruby-lsp (click) 1037641 890170 408 7395 47 0% 1 0 205.421689
sequel (click) 502571 438848 11 119 0 0% 0 0 3.902729
shipit (click) 7263787 6191506 3381 53858 169 0% 1 0 1779.027326
addressable-equality (click) 316640 276593 44 1379 1 0% 0 0 34.380162
addressable-getters (click) 277062 252271 26 863 0 0% 0 0 20.802413
addressable-join (click) 287021 258265 24 1005 0 0% 0 0 25.825737
addressable-merge (click) 282467 255130 27 896 0 0% 0 0 22.382764
addressable-new (click) 250123 227588 21 591 0 0% 0 0 14.703254
addressable-normalize (click) 312439 272040 43 1328 1 0% 0 0 32.976301
addressable-parse (click) 279779 254146 26 880 0 0% 0 0 21.625078
addressable-setters (click) 248557 244146 20 582 0 0% 0 0 14.429979
addressable-to-s (click) 276900 243232 26 849 0 0% 0 0 20.755338
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.845202
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.11594
erubi (click) 243116 210875 6 132 0 0% 0 0 3.903579
etanni (click) 32837 27420 8 111 0 0% 0 0 3.482338
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.059937
fluentd (click) 483979 433083 7 115 0 0% 0 0 3.716096
graphql (click) 407544 341752 73 1895 19 1% 0 0 53.239708
graphql-native (click) 352796 341746 39 532 0 0% 0 0 14.002873
knucleotide (click) 9663 10633 7 107 0 0% 0 0 5.097415
lee (click) 316149 269894 49 1091 0 0% 0 0 31.515858
matmul (click) 11103 4709 8 136 0 0% 0 0 4.291093
nbody (click) 14448 21176 6 251 0 0% 0 0 6.156428
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.381347
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.540505
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.368169
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.608279
rack (click) 279838 255740 35 580 0 0% 0 0 15.15068
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.737097
rubyboy (click) 704515 655487 154 6871 42 0% 0 0 168.113432
rubykon (click) 149025 157510 137 2107 3 0% 0 0 56.885535
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.148762
tinygql (click) 300682 238775 59 1031 5 0% 0 0 27.186047
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1950.78087
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.6084
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.103469
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.530178
fib (click) 2659 2995 3 30 0 0% 0 0 1.119509
getivar (click) 3789 6778 3 79 0 0% 0 0 1.935613
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.325631
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.804096
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.8905
object-new (click) 2406 2818 2 36 0 0% 0 0 1.110254
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.167326
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.914544
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.791158
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.113171
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.445156
setivar (click) 2783 3726 3 46 0 0% 0 0 1.300037
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.422986
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.729614
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.447428
structaref (click) 4407 9095 3 88 0 0% 0 0 2.347825
structaset (click) 4113 5834 3 70 0 0% 0 0 1.796334
throw (click) 5953 4624 5 53 0 0% 0 0 1.828631

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.