Ruby Benchmarks

Details for Benchmarks at 2026-01-30 00:50:16 UTC

YJIT metrics from the ruby-bench suite using Ruby 604090cb8e.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.2% faster than CRuby 4.1.0dev
  • 5.9% faster than YJIT 3.4.7
On railsbench it is
  • 113.3% faster than CRuby 4.1.0dev
  • 11.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 3 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 98 50 191 50 234
chunky-png 5 31 5 33 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 420 5 431 50 626 50 640
liquid-compile 5 418 5 477 50 554 50 733
liquid-render 5 169 5 174 50 436 50 433
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 194 50 253 50 265
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 246 50 257
ruby-lsp 5 160 5 160 50 231 50 230
sequel 5 415 5 439 50 604 50 622
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 11
addressable-getters 5 164 5 167 50 184 50 200
addressable-join 5 73 5 77 50 66 50 71
addressable-merge 5 160 5 159 50 222 50 220
addressable-new 5 352 5 355 50 523 50 526
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 103 5 104 50 104 50 110
addressable-setters 5 184 5 182 50 229 50 231
addressable-to-s 5 163 5 168 50 183 50 198
binarytrees 5 82 5 86 50 136 50 144
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 143 50 135 50 150
etanni 5 98 5 71 50 71 50 37
fannkuchredux 5 55 5 57 50 102 50 103
fluentd 5 56 5 66 50 22 50 32
graphql 5 370 5 471 50 533 50 935
graphql-native 5 59 5 88 50 23 50 65
knucleotide 5 163 5 158 50 117 50 111
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 53 50 94 50 94
nbody 5 246 5 292 50 676 50 704
nqueens 5 116 5 127 50 556 50 573
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 185 50 706 50 747
protoboeuf-encode 5 197 5 206 50 835 50 828
rack 5 438 5 451 50 712 50 720
ruby-json 5 82 5 100 50 46 50 73
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 156
tinygql 5 41 5 43 50 39 50 49
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 40 50 458 50 456
attr_accessor 5 157 5 220 50 1834 50 1951
cfunc_itself 5 347 5 360 50 1255 50 1259
fib 5 124 5 146 50 940 50 940
getivar 5 216 5 338 50 2315 50 2442
getivar-module 5 104 5 141 50 90 50 269
keyword_args 5 100 5 104 50 1240 50 1243
loops-times 5 23 5 27 50 64 50 62
object-new 5 268 5 378 50 297 50 738
respond_to 5 138 5 140 50 3888 50 3903
ruby-xor 5 236 5 238 50 1314 50 1295
send_bmethod 5 117 5 125 50 5538 50 4527
send_cfunc_block 5 107 5 104 50 353 50 345
send_rubyfunc_block 5 250 5 253 50 6925 50 6927
setivar 5 359 5 478 50 4922 50 5041
setivar_object 5 343 5 289 50 750 50 539
setivar_young 5 341 5 292 50 795 50 553
str_concat 5 391 5 450 50 1200 50 1191
structaref 5 156 5 205 50 1812 50 1906
structaset 5 203 5 267 50 396 50 504
throw 5 1092 5 1340 50 1411 50 1619

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) 1545826 1339572 203 2634 0 0% 0 0 75.874689
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 38.958294
erubi-rails (click) 1363221 1171662 268 3615 22 0% 0 0 97.998229
hexapdf (click) 1521929 1222186 593 15665 44 0% 0 0 438.260837
liquid-c (click) 545890 524581 114 2231 5 0% 0 0 59.815245
liquid-compile (click) 481695 450487 146 2737 2 0% 0 0 80.044282
liquid-render (click) 659673 566228 131 2950 8 0% 0 0 79.574588
lobsters (click) 8698060 7191350 3127 64182 117 0% 0 0 2128.341801
mail (click) 866011 851710 345 7700 40 0% 0 0 214.386173
psych-load (click) 288093 249195 61 829 2 0% 0 0 23.981846
railsbench (click) 3337229 2943413 1591 19681 97 0% 0 0 551.161065
rubocop (click) 5756573 4992771 3002 56850 125 0% 6 0 1663.840425
ruby-lsp (click) 1037345 898465 408 7395 47 0% 1 0 204.948676
sequel (click) 495970 412603 11 119 0 0% 0 0 3.850917
shipit (click) 7112225 6076769 3300 51977 169 0% 0 0 1717.536534
addressable-equality (click) 304663 279144 44 1379 1 0% 0 0 34.132668
addressable-getters (click) 277464 252690 26 865 0 0% 0 0 20.990217
addressable-join (click) 273257 266218 24 941 0 0% 0 0 23.495539
addressable-merge (click) 282708 247146 27 896 0 0% 0 0 22.006019
addressable-new (click) 258187 245834 21 591 0 0% 0 0 15.018349
addressable-normalize (click) 311920 271734 43 1328 1 0% 0 0 33.128998
addressable-parse (click) 279493 254039 26 880 0 0% 0 0 21.779432
addressable-setters (click) 248470 211427 20 584 0 0% 0 0 14.815703
addressable-to-s (click) 278877 245673 26 889 0 0% 0 0 21.864787
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.795127
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.191209
erubi (click) 247634 222760 6 132 0 0% 0 0 3.907701
etanni (click) 32382 26816 8 111 0 0% 0 0 3.432982
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.067329
fluentd (click) 477227 425455 7 115 0 0% 0 0 3.778508
graphql (click) 396394 336694 73 1895 18 0% 0 0 53.552047
graphql-native (click) 353042 325590 39 532 0 0% 0 0 14.489356
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.839748
lee (click) 316935 287050 49 1088 0 0% 0 0 31.253973
matmul (click) 11103 4709 8 136 0 0% 0 0 4.198574
nbody (click) 14448 21176 6 251 0 0% 0 0 6.193882
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.39553
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.26236
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.800172
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.515973
rack (click) 279937 231287 35 585 0 0% 0 0 15.324268
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.699504
rubyboy (click) 691954 624675 154 6869 42 0% 0 0 168.129322
rubykon (click) 147478 130977 137 2088 3 0% 0 0 56.503402
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.348652
tinygql (click) 300164 271099 59 1025 5 0% 0 0 26.987969
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1954.019024
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.013631
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.081155
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.517742
fib (click) 2659 2995 3 30 0 0% 0 0 1.123711
getivar (click) 3789 6778 3 79 0 0% 0 0 1.947893
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.332207
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823946
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92489
object-new (click) 2406 2818 2 36 0 0% 0 0 1.099466
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.150911
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.8289
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.824237
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.102202
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.470327
setivar (click) 2783 3726 3 46 0 0% 0 0 1.219998
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.403542
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.727605
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.458321
structaref (click) 4407 9095 3 88 0 0% 0 0 2.349601
structaset (click) 4113 5834 3 70 0 0% 0 0 1.803851
throw (click) 5953 4624 5 53 0 0% 0 0 1.803481

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.