Ruby Benchmarks

Details for Benchmarks at 2026-01-19 00:46:25 UTC

YJIT metrics from the ruby-bench suite using Ruby 64c142770a.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.3% faster than CRuby 4.1.0dev
  • 5.2% faster than YJIT 3.4.7
On railsbench it is
  • 118.1% faster than CRuby 4.1.0dev
  • 13.9% 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 91 5 98 50 197 50 222
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 430 50 624 50 638
liquid-compile 5 419 5 473 50 582 50 717
liquid-render 5 172 5 172 50 436 50 425
mail 5 195 5 190 50 252 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 159 50 247 50 254
ruby-lsp 5 159 5 163 50 227 50 229
sequel 5 420 5 422 50 584 50 590
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 165 5 165 50 184 50 189
addressable-join 5 73 5 74 50 66 50 69
addressable-merge 5 160 5 154 50 222 50 216
addressable-new 5 350 5 345 50 523 50 511
addressable-normalize 5 54 5 52 50 59 50 57
addressable-parse 5 103 5 103 50 103 50 105
addressable-setters 5 183 5 177 50 229 50 220
addressable-to-s 5 164 5 166 50 184 50 190
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 136 5 145 50 119 50 144
etanni 5 97 5 70 50 71 50 36
fannkuchredux 5 54 5 57 50 102 50 108
fluentd 5 56 5 63 50 20 50 32
graphql 5 372 5 456 50 565 50 915
graphql-native 5 59 5 86 50 23 50 66
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 271 50 676 50 703
nqueens 5 116 5 128 50 556 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 180 50 705 50 725
protoboeuf-encode 5 197 5 206 50 831 50 783
rack 5 442 5 446 50 721 50 683
ruby-json 5 82 5 96 50 46 50 71
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 156
tinygql 5 41 5 43 50 40 50 46
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 455 50 454
attr_accessor 5 157 5 207 50 1836 50 1938
cfunc_itself 5 348 5 346 50 1255 50 1259
fib 5 124 5 145 50 940 50 940
getivar 5 218 5 327 50 2311 50 2432
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 103 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 62
object-new 5 252 5 365 50 296 50 674
respond_to 5 139 5 136 50 3889 50 3899
ruby-xor 5 236 5 230 50 1314 50 1278
send_bmethod 5 116 5 122 50 5538 50 4527
send_cfunc_block 5 105 5 106 50 353 50 341
send_rubyfunc_block 5 251 5 250 50 6921 50 6929
setivar 5 360 5 463 50 4924 50 5045
setivar_object 5 341 5 303 50 755 50 636
setivar_young 5 341 5 307 50 797 50 657
str_concat 5 390 5 447 50 1200 50 1215
structaref 5 156 5 202 50 1810 50 1885
structaset 5 202 5 247 50 396 50 486
throw 5 1090 5 1252 50 1416 50 1565

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) 1544760 1297615 203 2642 0 0% 0 0 76.28873
chunky-png (click) 320647 312345 79 1374 1 0% 0 0 39.580858
erubi-rails (click) 1362641 1211773 268 3646 22 0% 0 0 97.762146
hexapdf (click) 1512284 1237885 594 15720 44 0% 0 0 443.48264
liquid-c (click) 559221 490863 114 2231 5 0% 0 0 59.855185
liquid-compile (click) 480287 448307 146 2703 2 0% 0 0 78.926224
liquid-render (click) 664407 613168 131 2950 8 0% 0 0 79.977472
mail (click) 865429 859457 345 7700 40 0% 0 0 215.249817
psych-load (click) 287718 281596 61 829 2 0% 0 0 23.828669
railsbench (click) 3345063 2888247 1591 19734 97 0% 0 0 553.814665
rubocop (click) 5768768 5014533 3002 56977 125 0% 6 0 1674.213113
ruby-lsp (click) 1037753 865755 407 7369 46 0% 1 0 206.966971
sequel (click) 502442 381429 11 119 0 0% 0 0 3.920086
shipit (click) 7099958 6052835 3297 51923 169 0% 0 0 1707.341462
addressable-equality (click) 316302 276412 44 1379 1 0% 0 0 34.494545
addressable-getters (click) 277303 211539 26 863 0 0% 0 0 20.787695
addressable-join (click) 282677 252780 24 941 0 0% 0 0 23.531642
addressable-merge (click) 282708 238974 27 896 0 0% 0 0 22.265515
addressable-new (click) 257012 244339 21 563 0 0% 0 0 13.970314
addressable-normalize (click) 312012 288014 43 1326 1 0% 0 0 32.660861
addressable-parse (click) 280020 254354 26 880 0 0% 0 0 21.707546
addressable-setters (click) 257323 222186 20 584 0 0% 0 0 14.666203
addressable-to-s (click) 276916 243241 26 849 0 0% 0 0 20.591539
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.80077
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.23662
erubi (click) 247151 214262 6 132 0 0% 0 0 3.950873
etanni (click) 32382 26816 8 111 0 0% 0 0 3.470223
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.105123
fluentd (click) 483506 465461 7 115 0 0% 0 0 3.748054
graphql (click) 408297 358798 73 1895 19 1% 0 0 53.482279
graphql-native (click) 352859 341885 39 532 0 0% 0 0 14.070317
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.895524
lee (click) 316656 319590 49 1088 0 0% 0 0 31.267154
matmul (click) 11103 4709 8 136 0 0% 0 0 4.243479
nbody (click) 14448 21176 6 251 0 0% 0 0 6.138182
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.353432
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 112.191236
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.704413
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.555959
rack (click) 284074 220618 35 627 0 0% 0 0 16.334793
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.766455
rubyboy (click) 704928 696837 154 6871 42 0% 0 0 167.915355
rubykon (click) 150159 150861 137 2124 3 0% 0 0 57.381246
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.274287
tinygql (click) 300693 271592 59 1031 5 0% 0 0 27.279796
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1955.619976
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 496.027943
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.082078
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.531253
fib (click) 2659 2995 3 30 0 0% 0 0 1.142691
getivar (click) 3789 6778 3 79 0 0% 0 0 1.94949
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.313363
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.814886
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.884369
object-new (click) 2406 2818 2 36 0 0% 0 0 1.043658
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.194884
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.848352
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.814406
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.142627
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.489103
setivar (click) 2783 3726 3 46 0 0% 0 0 1.298014
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.426296
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.74129
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.434156
structaref (click) 4407 9095 3 88 0 0% 0 0 2.365097
structaset (click) 4113 5834 3 70 0 0% 0 0 1.827125
throw (click) 5953 4624 5 53 0 0% 0 0 1.826249

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.