Ruby Benchmarks

Details for Benchmarks at 2026-07-05 01:07:13 UTC

YJIT metrics from the ruby-bench suite using Ruby 96311d13c2.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.2% faster than CRuby 4.1.0dev
  • 9.6% faster than YJIT 3.4.7
On railsbench it is
  • 119.8% faster than CRuby 4.1.0dev
  • 16.2% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 1 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 91 5 98 50 199 50 233
chunky-png 5 31 5 30 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 439 50 616 50 674
liquid-compile 5 418 5 514 50 572 50 833
liquid-render 5 173 5 173 50 434 50 466
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 205 50 253 50 300
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 153 5 162 50 221 50 230
sequel 5 427 5 465 50 581 50 665
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 170 50 182 50 204
addressable-join 5 75 5 83 50 66 50 82
addressable-merge 5 161 5 159 50 221 50 233
addressable-new 5 348 5 348 50 509 50 532
addressable-normalize 5 53 5 57 50 60 50 70
addressable-parse 5 104 5 106 50 104 50 117
addressable-setters 5 184 5 184 50 234 50 249
addressable-to-s 5 165 5 170 50 181 50 205
binarytrees 5 82 5 85 50 136 50 141
blurhash 5 84 5 83 50 145 50 145
erubi 5 137 5 148 50 135 50 151
etanni 5 100 5 81 50 72 50 47
fannkuchredux 5 55 5 57 50 101 50 104
fluentd 5 61 5 58 50 20 50 24
gcbench 5 10 5 10 50 10 50 18
graphql 5 371 5 465 50 567 50 959
graphql-native 5 57 5 89 50 22 50 56
knucleotide 5 163 5 142 50 118 50 96
lee 5 23 5 30 50 10 50 17
matmul 5 53 5 53 50 87 50 94
nbody 5 246 5 248 50 663 50 681
nqueens 5 119 5 129 50 554 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 186 50 697 50 783
protoboeuf-encode 5 201 5 202 50 800 50 807
rack 5 446 5 480 50 716 50 796
ruby-json 5 83 5 112 50 51 50 91
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 207 50 250 50 242
sudoku 5 48 5 50 50 155 50 157
tinygql 5 42 5 43 50 40 50 55
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 453 50 454
attr_accessor 5 157 5 166 50 1833 50 1870
cfunc_itself 5 348 5 311 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 216 5 335 50 2316 50 2440
getivar-module 5 103 5 132 50 89 50 273
keyword_args 5 102 5 105 50 1240 50 1245
loops-times 5 23 5 25 50 63 50 62
object-new 5 268 5 473 50 297 50 1472
object-new-initialize 5 169 5 269 50 260 50 982
object-new-no-escape 5 80 5 143 50 89 50 512
respond_to 5 139 5 120 50 3896 50 3907
ruby-xor 5 247 5 241 50 1305 50 1311
send_bmethod 5 118 5 110 50 5539 50 4526
send_cfunc_block 5 105 5 103 50 305 50 284
send_rubyfunc_block 5 196 5 199 50 1372 50 1375
setivar 5 359 5 434 50 4931 50 5010
setivar_object 5 341 5 301 50 762 50 598
setivar_young 5 342 5 301 50 809 50 610
str_concat 5 391 5 429 50 1203 50 1021
structaref 5 153 5 179 50 1799 50 1857
structaset 5 198 5 221 50 369 50 484
throw 5 1112 5 1331 50 1443 50 1724

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) 1564840 1255388 204 2662 0 0% 0 0 79.252782
chunky-png (click) 325941 300630 79 1376 1 0% 0 0 38.607071
erubi-rails (click) 1387279 1184184 268 3626 23 0% 0 0 94.645774
hexapdf (click) 1535244 1298528 593 15767 44 0% 0 0 428.12987
liquid-c (click) 568228 488917 114 2240 5 0% 0 0 59.527095
liquid-compile (click) 482898 424059 146 2673 2 0% 0 0 73.088713
liquid-render (click) 674590 669675 131 2963 8 0% 0 0 77.498172
lobsters (click) 8555883 7154503 3124 63356 122 0% 0 0 2023.004476
mail (click) 877093 837320 345 7739 40 0% 0 0 209.146513
psych-load (click) 292535 228896 60 829 2 0% 0 0 23.622402
railsbench (click) 3360600 2963271 1592 19741 105 0% 0 0 537.77768
rubocop (click) 5806365 5002215 3001 57361 129 0% 6 0 1633.12766
ruby-lsp (click) 1053209 933799 409 7470 47 0% 1 0 201.601612
sequel (click) 510922 405992 11 119 0 0% 0 0 4.284932
shipit (click) 6896879 5856435 3134 50088 147 0% 0 0 1600.836329
addressable-equality (click) 307038 238482 44 1381 1 0% 0 0 33.559348
addressable-getters (click) 283286 266097 26 863 0 0% 0 0 20.240667
addressable-join (click) 288823 241943 24 941 0 0% 0 0 22.598774
addressable-merge (click) 290891 246777 27 896 0 0% 0 0 21.507739
addressable-new (click) 265724 236093 21 563 0 0% 0 0 13.58961
addressable-normalize (click) 321355 280787 43 1327 1 0% 0 0 31.976754
addressable-parse (click) 288085 262085 26 880 0 0% 0 0 21.100811
addressable-setters (click) 265917 230182 20 582 0 0% 0 0 14.142078
addressable-to-s (click) 285888 260434 26 849 0 0% 0 0 20.137042
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.731097
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.895669
erubi (click) 252789 242938 6 134 0 0% 0 0 3.836091
etanni (click) 32989 26478 8 114 0 0% 0 0 3.447515
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.836293
fluentd (click) 519002 471647 7 116 0 0% 0 0 3.617674
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.419915
graphql (click) 415859 363272 74 1940 19 0% 0 0 52.996809
graphql-native (click) 343154 293241 39 532 0 0% 0 0 13.805778
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.654429
lee (click) 319943 255309 50 1102 0 0% 0 0 30.598842
matmul (click) 11103 4709 8 136 0 0% 0 0 4.101739
nbody (click) 14448 21176 6 251 0 0% 0 0 6.176376
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.277207
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.392254
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.966544
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.815338
rack (click) 289104 240940 35 581 0 0% 0 0 14.666912
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.753371
rubyboy (click) 708797 585305 154 6871 42 0% 0 0 163.876954
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.811284
splay (click) 34617 22483 9 175 0 0% 0 0 5.314571
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.997367
tinygql (click) 304206 258248 59 1026 5 0% 0 0 26.396787
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1879.69262
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 478.617502
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.099918
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.492429
fib (click) 2659 2995 3 30 0 0% 0 0 1.11156
getivar (click) 3789 6778 3 79 0 0% 0 0 1.955404
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.330547
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.766477
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.904508
object-new (click) 2406 2818 2 36 0 0% 0 0 0.97719
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.363375
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.73881
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.132593
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.799554
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.795124
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.276479
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.718112
setivar (click) 2783 3726 3 46 0 0% 0 0 1.260682
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.405684
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.737838
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.445024
structaref (click) 4407 9095 3 88 0 0% 0 0 2.358539
structaset (click) 4113 5834 3 70 0 0% 0 0 1.76349
throw (click) 5953 4624 5 53 0 0% 0 0 1.782619

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.