Ruby Benchmarks

Details for Benchmarks at 2026-01-24 00:42:38 UTC

YJIT metrics from the ruby-bench suite using Ruby 887913efc0.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.9% faster than CRuby 4.1.0dev
  • 4.6% faster than YJIT 3.4.7
On railsbench it is
  • 115.2% faster than CRuby 4.1.0dev
  • 12.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 10 minutes
aarch64 runtime: 7 hours, 4 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 188 50 232
chunky-png 5 32 5 32 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 426 50 629 50 629
liquid-compile 5 417 5 477 50 584 50 693
liquid-render 5 171 5 176 50 432 50 428
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 189 50 253 50 262
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 159 50 248 50 253
ruby-lsp 5 156 5 161 50 226 50 229
sequel 5 423 5 424 50 591 50 592
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 163 5 168 50 184 50 186
addressable-join 5 73 5 77 50 66 50 69
addressable-merge 5 160 5 155 50 222 50 215
addressable-new 5 352 5 343 50 526 50 505
addressable-normalize 5 53 5 53 50 59 50 56
addressable-parse 5 103 5 103 50 104 50 103
addressable-setters 5 183 5 182 50 230 50 219
addressable-to-s 5 163 5 165 50 184 50 184
binarytrees 5 82 5 82 50 136 50 128
blurhash 5 83 5 87 50 143 50 145
erubi 5 134 5 144 50 127 50 138
etanni 5 97 5 69 50 71 50 35
fannkuchredux 5 54 5 57 50 100 50 106
fluentd 5 56 5 62 50 19 50 29
graphql 5 366 5 458 50 574 50 920
graphql-native 5 58 5 86 50 23 50 69
knucleotide 5 163 5 158 50 118 50 112
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 55 50 95 50 95
nbody 5 246 5 274 50 676 50 664
nqueens 5 116 5 125 50 556 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 185 50 706 50 702
protoboeuf-encode 5 197 5 206 50 831 50 808
rack 5 442 5 445 50 718 50 690
ruby-json 5 82 5 97 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 48 50 157 50 156
tinygql 5 42 5 44 50 40 50 48
30k_ifelse 5 28 5 28 50 185 50 182
30k_methods 5 38 5 40 50 457 50 454
attr_accessor 5 157 5 195 50 1834 50 1919
cfunc_itself 5 348 5 345 50 1255 50 1259
fib 5 123 5 145 50 938 50 939
getivar 5 212 5 323 50 2312 50 2431
getivar-module 5 104 5 139 50 90 50 268
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 269 5 363 50 299 50 673
respond_to 5 139 5 139 50 3890 50 3901
ruby-xor 5 237 5 244 50 1314 50 1278
send_bmethod 5 116 5 123 50 5539 50 4527
send_cfunc_block 5 105 5 107 50 353 50 346
send_rubyfunc_block 5 251 5 252 50 6917 50 6933
setivar 5 359 5 481 50 4925 50 5044
setivar_object 5 341 5 301 50 752 50 636
setivar_young 5 341 5 304 50 797 50 658
str_concat 5 390 5 450 50 1199 50 1126
structaref 5 156 5 200 50 1812 50 1897
structaset 5 202 5 277 50 397 50 486
throw 5 1091 5 1255 50 1412 50 1553

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) 1546182 1298664 203 2652 0 0% 0 0 75.325646
chunky-png (click) 320399 279450 79 1374 1 0% 0 0 38.923873
erubi-rails (click) 1368768 1202438 268 3680 22 0% 0 0 98.28209
hexapdf (click) 1522676 1280726 593 15686 44 0% 0 0 441.071221
liquid-c (click) 559498 540243 114 2231 5 0% 0 0 59.710841
liquid-compile (click) 484206 469483 146 2746 2 0% 0 0 80.41383
liquid-render (click) 664463 596786 131 2950 8 0% 0 0 79.508678
lobsters (click) 8707425 7309245 3127 64234 117 0% 0 0 2199.391058
mail (click) 866595 885120 345 7710 40 0% 0 0 212.449716
psych-load (click) 287997 273632 61 829 2 0% 0 0 23.831975
railsbench (click) 3339909 2914968 1591 19694 97 0% 0 0 549.360881
rubocop (click) 5752875 4989426 3002 56848 125 0% 6 0 1654.987752
ruby-lsp (click) 1037690 898895 408 7395 47 0% 1 0 206.562457
sequel (click) 504009 465029 11 119 0 0% 0 0 4.062878
shipit (click) 7843723 6656605 3421 55486 186 0% 1 0 1824.94299
addressable-equality (click) 316879 284993 44 1379 1 0% 0 0 34.204129
addressable-getters (click) 264020 221252 26 865 0 0% 0 0 21.342852
addressable-join (click) 282150 285233 24 941 0 0% 0 0 23.281408
addressable-merge (click) 282708 255338 27 896 0 0% 0 0 22.227114
addressable-new (click) 261473 240811 21 633 0 0% 0 0 15.538343
addressable-normalize (click) 313706 281894 43 1351 1 0% 0 0 33.339049
addressable-parse (click) 279493 254039 26 880 0 0% 0 0 21.700527
addressable-setters (click) 257734 230551 20 582 0 0% 0 0 14.564019
addressable-to-s (click) 276384 259310 26 849 0 0% 0 0 20.661993
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.775621
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.105986
erubi (click) 247106 214213 6 132 0 0% 0 0 3.983734
etanni (click) 32382 26816 8 111 0 0% 0 0 3.426724
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.008886
fluentd (click) 484495 417206 7 115 0 0% 0 0 3.757673
graphql (click) 408672 367357 73 1895 19 1% 0 0 53.189267
graphql-native (click) 353138 333901 39 532 0 0% 0 0 14.217589
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.831648
lee (click) 316935 295242 49 1088 0 0% 0 0 30.920326
matmul (click) 11103 4709 8 136 0 0% 0 0 4.233246
nbody (click) 14448 21176 6 251 0 0% 0 0 6.100795
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.354627
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.546254
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.078222
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.176982
rack (click) 282728 284766 35 627 0 0% 0 0 16.205781
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.659945
rubyboy (click) 703937 630465 154 6869 42 0% 0 0 167.796845
rubykon (click) 146988 154938 137 2081 3 0% 0 0 56.436507
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.114818
tinygql (click) 300693 271592 59 1031 5 0% 0 0 27.422494
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1951.928119
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.096844
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.098619
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.531849
fib (click) 2659 2995 3 30 0 0% 0 0 1.129931
getivar (click) 3789 6778 3 79 0 0% 0 0 1.938717
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.33145
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.843092
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.953072
object-new (click) 2406 2818 2 36 0 0% 0 0 1.120976
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.147614
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.801815
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.789228
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.14621
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.485234
setivar (click) 2783 3726 3 46 0 0% 0 0 1.278171
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.395745
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.730094
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.474105
structaref (click) 4407 9095 3 88 0 0% 0 0 2.367581
structaset (click) 4113 5834 3 70 0 0% 0 0 1.785646
throw (click) 5953 4624 5 53 0 0% 0 0 1.760313

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.