Ruby Benchmarks

Details for Benchmarks at 2025-12-27 00:41:26 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 99.1% faster than CRuby 4.1.0dev
  • 5.5% faster than YJIT 3.4.7
On railsbench it is
  • 114.4% faster than CRuby 4.1.0dev
  • 11.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 minutes
aarch64 runtime: 7 hours, 6 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 200 50 239
chunky-png 5 31 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 419 5 421 50 626 50 627
liquid-compile 5 415 5 471 50 584 50 717
liquid-render 5 173 5 173 50 435 50 428
mail 5 195 5 191 50 254 50 258
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 245 50 247
ruby-lsp 5 141 5 146 50 223 50 248
sequel 5 427 5 423 50 581 50 595
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 168 50 183 50 193
addressable-join 5 73 5 75 50 66 50 69
addressable-merge 5 160 5 154 50 222 50 219
addressable-new 5 354 5 347 50 526 50 517
addressable-normalize 5 53 5 53 50 59 50 57
addressable-parse 5 103 5 104 50 104 50 109
addressable-setters 5 183 5 180 50 230 50 226
addressable-to-s 5 162 5 169 50 183 50 188
binarytrees 5 82 5 83 50 136 50 137
blurhash 5 83 5 87 50 143 50 144
erubi 5 125 5 142 50 136 50 140
etanni 5 98 5 67 50 71 50 33
fannkuchredux 5 54 5 55 50 101 50 98
fluentd 5 56 5 60 50 29 50 29
graphql 5 371 5 463 50 568 50 922
graphql-native 5 58 5 86 50 23 50 63
knucleotide 5 162 5 154 50 117 50 107
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 246 5 255 50 677 50 703
nqueens 5 116 5 127 50 556 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 179 50 706 50 720
protoboeuf-encode 5 198 5 201 50 834 50 773
rack 5 437 5 450 50 705 50 699
ruby-json 5 81 5 96 50 46 50 66
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 156 50 162
tinygql 5 41 5 43 50 40 50 46
30k_ifelse 5 28 5 28 50 184 50 180
30k_methods 5 38 5 40 50 454 50 452
attr_accessor 5 157 5 197 50 1835 50 1925
cfunc_itself 5 347 5 347 50 1255 50 1259
fib 5 124 5 144 50 938 50 939
getivar 5 217 5 329 50 2313 50 2427
getivar-module 5 104 5 142 50 90 50 265
keyword_args 5 100 5 109 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 61
object-new 5 268 5 365 50 298 50 684
respond_to 5 139 5 139 50 3888 50 3901
ruby-xor 5 236 5 254 50 1314 50 1290
send_bmethod 5 116 5 120 50 5539 50 4527
send_cfunc_block 5 106 5 106 50 353 50 343
send_rubyfunc_block 5 250 5 250 50 6919 50 6927
setivar 5 360 5 475 50 4928 50 5039
setivar_object 5 341 5 299 50 754 50 537
setivar_young 5 341 5 302 50 797 50 547
str_concat 5 390 5 430 50 1196 50 1136
structaref 5 156 5 204 50 1814 50 1892
structaset 5 201 5 254 50 396 50 515
throw 5 1090 5 1252 50 1407 50 1571

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) 1542607 1328983 203 2645 0 0% 0 0 75.051648
chunky-png (click) 320668 303950 79 1373 1 0% 0 0 38.942853
erubi-rails (click) 1372452 1183795 268 3704 22 0% 0 0 98.483555
hexapdf (click) 1522132 1328992 594 15666 44 0% 0 0 434.751631
liquid-c (click) 554429 509622 114 2228 5 0% 0 0 59.659139
liquid-compile (click) 469962 434916 146 2715 2 0% 0 0 79.560904
liquid-render (click) 660781 592293 131 2946 8 0% 0 0 79.033193
mail (click) 866872 828428 345 7721 40 0% 0 0 212.839468
psych-load (click) 288324 265903 61 828 2 0% 0 0 23.752202
railsbench (click) 3344277 2971507 1591 19745 97 0% 0 0 551.983791
rubocop (click) 5759883 4972365 3002 56869 126 0% 6 0 1666.113883
ruby-lsp (click) 951043 845979 343 6741 45 0% 1 0 182.799844
sequel (click) 496102 380098 11 119 0 0% 0 0 3.960548
shipit (click) 7545631 6479524 3281 52042 182 0% 0 0 1716.468344
addressable-equality (click) 318424 254007 44 1406 1 0% 0 0 34.632346
addressable-getters (click) 274560 248994 26 863 0 0% 0 0 20.929199
addressable-join (click) 279682 224432 24 941 0 0% 0 0 23.875263
addressable-merge (click) 282450 238693 27 896 0 0% 0 0 22.242535
addressable-new (click) 254998 233217 21 565 0 0% 0 0 14.370284
addressable-normalize (click) 309655 293084 43 1328 1 0% 0 0 32.814784
addressable-parse (click) 279762 229517 26 880 0 0% 0 0 21.741662
addressable-setters (click) 258913 215399 20 582 0 0% 0 0 14.559582
addressable-to-s (click) 276737 243011 26 849 0 0% 0 0 20.919447
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.799737
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.067696
erubi (click) 235610 192473 6 134 0 0% 0 0 3.975632
etanni (click) 33287 36246 8 113 0 0% 0 0 3.677106
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.006196
fluentd (click) 482922 424017 7 115 0 0% 0 0 3.768623
graphql (click) 401492 358955 73 1921 19 0% 0 0 54.400279
graphql-native (click) 345898 309081 39 532 0 0% 0 0 13.810524
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.127555
lee (click) 314762 259953 49 1094 0 0% 0 0 31.246972
matmul (click) 11103 4709 8 136 0 0% 0 0 4.24496
nbody (click) 14448 21176 6 251 0 0% 0 0 6.131659
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.361418
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.50795
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.570379
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.174753
rack (click) 277547 244707 35 580 0 0% 0 0 15.185433
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.683893
rubyboy (click) 697813 629189 154 6862 42 0% 0 0 167.570237
rubykon (click) 147221 147074 137 2084 3 0% 0 0 55.651491
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.076467
tinygql (click) 300500 246812 59 1031 5 0% 0 0 27.131451
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1926.51013
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.009464
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.035775
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.483275
fib (click) 2659 2995 3 30 0 0% 0 0 1.09557
getivar (click) 3789 6778 3 79 0 0% 0 0 1.929316
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.321307
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.797368
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.87839
object-new (click) 2406 2818 2 36 0 0% 0 0 1.006095
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.109273
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.800856
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.780106
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.155617
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.447966
setivar (click) 2783 3726 3 46 0 0% 0 0 1.280824
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408706
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.709487
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.401183
structaref (click) 4407 9095 3 88 0 0% 0 0 2.335021
structaset (click) 3926 5614 3 70 0 0% 0 0 1.722476
throw (click) 5953 4624 5 53 0 0% 0 0 1.814828

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.