Ruby Benchmarks

Details for Benchmarks at 2026-05-21 01:21:51 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.8% faster than CRuby 4.1.0dev
  • 10.3% faster than YJIT 3.4.7
On railsbench it is
  • 121.7% faster than CRuby 4.1.0dev
  • 17.0% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 2 minutes
aarch64 runtime: 7 hours, 51 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 94 50 199 50 222
chunky-png 5 31 5 31 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 441 50 617 50 682
liquid-compile 5 420 5 518 50 580 50 860
liquid-render 5 172 5 171 50 435 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 210 50 253 50 312
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 155 50 246 50 254
ruby-lsp 5 159 5 160 50 221 50 224
sequel 5 429 5 461 50 597 50 661
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 19
addressable-getters 5 166 5 174 50 182 50 215
addressable-join 5 75 5 84 50 65 50 85
addressable-merge 5 161 5 159 50 224 50 249
addressable-new 5 354 5 347 50 519 50 561
addressable-normalize 5 53 5 57 50 60 50 72
addressable-parse 5 104 5 108 50 103 50 124
addressable-setters 5 185 5 188 50 234 50 264
addressable-to-s 5 164 5 173 50 182 50 214
binarytrees 5 82 5 84 50 136 50 149
blurhash 5 84 5 83 50 145 50 144
erubi 5 138 5 146 50 139 50 149
etanni 5 100 5 78 50 72 50 46
fannkuchredux 5 55 5 56 50 101 50 104
fluentd 5 58 5 60 50 21 50 31
gcbench 5 10 5 10 50 10 50 18
graphql 5 372 5 454 50 569 50 993
graphql-native 5 57 5 90 50 22 50 63
knucleotide 5 163 5 147 50 117 50 100
lee 5 23 5 30 50 10 50 16
matmul 5 53 5 52 50 87 50 98
nbody 5 249 5 250 50 663 50 701
nqueens 5 119 5 124 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 697 50 781
protoboeuf-encode 5 201 5 195 50 799 50 798
rack 5 442 5 461 50 715 50 785
ruby-json 5 84 5 114 50 50 50 92
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 11
splay 5 209 5 224 50 250 50 285
sudoku 5 48 5 49 50 155 50 167
tinygql 5 41 5 42 50 34 50 55
30k_ifelse 5 28 5 28 50 185 50 186
30k_methods 5 39 5 39 50 453 50 458
attr_accessor 5 157 5 174 50 1833 50 1881
cfunc_itself 5 346 5 318 50 1255 50 1259
fib 5 125 5 134 50 939 50 938
getivar 5 215 5 297 50 2307 50 2410
getivar-module 5 100 5 135 50 89 50 282
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 471 50 296 50 1519
object-new-initialize 5 169 5 234 50 259 50 1028
object-new-no-escape 5 81 5 139 50 89 50 520
respond_to 5 139 5 125 50 3899 50 3901
ruby-xor 5 247 5 233 50 1305 50 1294
send_bmethod 5 118 5 117 50 5539 50 4526
send_cfunc_block 5 106 5 106 50 304 50 290
send_rubyfunc_block 5 195 5 202 50 1372 50 1376
setivar 5 359 5 405 50 4930 50 4983
setivar_object 5 344 5 316 50 765 50 653
setivar_young 5 341 5 317 50 808 50 684
str_concat 5 390 5 452 50 1201 50 1140
structaref 5 153 5 166 50 1797 50 1830
structaset 5 198 5 216 50 369 50 484
throw 5 1108 5 1263 50 1446 50 1648

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) 1563876 1350575 203 2670 0 0% 0 0 74.312278
chunky-png (click) 325370 274968 79 1376 1 0% 0 0 38.339423
erubi-rails (click) 1389184 1119876 268 3660 23 0% 0 0 95.31437
hexapdf (click) 1538077 1325934 593 15817 44 0% 0 0 434.508846
liquid-c (click) 567716 478862 114 2252 5 0% 0 0 59.014213
liquid-compile (click) 485088 449735 146 2733 2 0% 0 0 76.916186
liquid-render (click) 670260 597728 131 2963 8 0% 0 0 77.044253
lobsters (click) 8577708 7311493 3125 63758 122 0% 0 0 2037.810856
mail (click) 873580 831014 345 7738 40 0% 0 0 208.15972
psych-load (click) 289406 232118 61 829 2 0% 0 0 23.306171
railsbench (click) 3361043 2894502 1592 19774 105 0% 0 0 534.002259
rubocop (click) 5800568 5066372 3002 57335 127 0% 6 0 1655.042829
ruby-lsp (click) 1053833 941944 409 7472 47 0% 1 0 201.158402
sequel (click) 510941 437991 11 119 0 0% 0 0 4.411399
shipit (click) 7175202 6098907 3119 50191 148 0% 0 0 1606.384441
addressable-equality (click) 323463 266076 44 1380 1 0% 0 0 33.216242
addressable-getters (click) 283096 248684 26 869 0 0% 0 0 20.487436
addressable-join (click) 286440 262397 24 1005 0 0% 0 0 24.296386
addressable-merge (click) 291242 279734 27 896 0 0% 0 0 21.343176
addressable-new (click) 266598 245019 21 569 0 0% 0 0 13.846144
addressable-normalize (click) 320912 304374 43 1327 1 0% 0 0 31.76652
addressable-parse (click) 269590 256009 26 880 0 0% 0 0 20.831328
addressable-setters (click) 263522 210367 20 588 0 0% 0 0 14.200219
addressable-to-s (click) 283408 248957 26 849 0 0% 0 0 20.108214
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.838927
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.090886
erubi (click) 249236 229713 6 134 0 0% 0 0 3.806822
etanni (click) 32752 34339 8 114 0 0% 0 0 3.404214
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.896792
fluentd (click) 490911 396697 7 116 0 0% 0 0 3.73503
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.49605
graphql (click) 413656 376285 73 1931 19 0% 0 0 52.465856
graphql-native (click) 357795 301582 39 532 0 0% 0 0 14.052567
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.893196
lee (click) 318470 285348 49 1093 0 0% 0 0 30.215973
matmul (click) 11103 4709 8 136 0 0% 0 0 4.178476
nbody (click) 14448 21176 6 251 0 0% 0 0 6.094617
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.361303
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 108.077327
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.988909
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 42.896972
rack (click) 285039 243186 35 586 0 0% 0 0 14.673767
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.682501
rubyboy (click) 689448 618866 154 6873 42 0% 0 0 164.995979
rubykon (click) 148777 155950 138 2107 4 0% 0 0 55.75429
splay (click) 34953 22682 9 175 0 0% 0 0 5.233833
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.950528
tinygql (click) 301659 262655 59 1026 5 0% 0 0 26.107595
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1857.412051
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 474.654787
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.104192
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.514558
fib (click) 2659 2995 3 30 0 0% 0 0 1.103932
getivar (click) 3789 6778 3 79 0 0% 0 0 2.009255
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.355375
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.847845
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.888825
object-new (click) 2406 2818 2 36 0 0% 0 0 1.049721
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.329432
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.999971
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.177333
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.787728
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.785802
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.321907
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.762275
setivar (click) 2783 3726 3 46 0 0% 0 0 1.229069
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406749
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.787205
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.531468
structaref (click) 4407 9095 3 88 0 0% 0 0 2.337321
structaset (click) 4113 5834 3 70 0 0% 0 0 1.772398
throw (click) 5953 4624 5 53 0 0% 0 0 1.791273

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.