Ruby Benchmarks

Details for Benchmarks at 2025-12-04 00:41:25 UTC

YJIT metrics from the ruby-bench suite using Ruby 8f7d821dba.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 91.6% faster than CRuby 4.0.0dev
  • 1.3% faster than YJIT 3.4.7
On railsbench it is
  • 96.9% faster than CRuby 4.0.0dev
  • 3.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 13 minutes
aarch64 runtime: 7 hours, 5 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 85 5 88 50 194 50 224
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 421 5 390 50 623 50 575
liquid-compile 5 417 5 467 50 580 50 717
liquid-render 5 172 5 168 50 414 50 355
lobsters 5 19 5 20 50 10 50 10
mail 5 195 5 176 50 253 50 202
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 247 50 252
ruby-lsp 5 139 5 148 50 246 50 250
sequel 5 420 5 436 50 584 50 612
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 164 5 165 50 183 50 190
addressable-join 5 74 5 53 50 66 50 19
addressable-merge 5 159 5 152 50 222 50 211
addressable-new 5 356 5 332 50 521 50 496
addressable-normalize 5 54 5 54 50 59 50 56
addressable-parse 5 103 5 102 50 105 50 105
addressable-setters 5 186 5 177 50 230 50 220
addressable-to-s 5 163 5 164 50 184 50 189
binarytrees 5 82 5 83 50 136 50 132
blurhash 5 83 5 87 50 143 50 145
erubi 5 128 5 137 50 128 50 135
etanni 5 98 5 70 50 72 50 36
fannkuchredux 5 54 5 48 50 102 50 78
fluentd 5 56 5 61 50 19 50 32
graphql 5 373 5 446 50 532 50 937
graphql-native 5 59 5 79 50 22 50 63
knucleotide 5 163 5 165 50 117 50 118
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 52 50 94 50 90
nbody 5 247 5 262 50 676 50 662
nqueens 5 116 5 121 50 557 50 555
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 186 50 706 50 759
protoboeuf-encode 5 192 5 208 50 834 50 809
rack 5 438 5 442 50 704 50 695
ruby-json 5 82 5 99 50 47 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 157 50 147
tinygql 5 41 5 43 50 40 50 49
30k_ifelse 5 28 5 28 50 183 50 183
30k_methods 5 38 5 40 50 448 50 456
attr_accessor 5 157 5 193 50 1834 50 1913
cfunc_itself 5 348 5 350 50 1254 50 1259
fib 5 124 5 139 50 940 50 939
getivar 5 217 5 317 50 2317 50 2432
getivar-module 5 104 5 140 50 90 50 271
keyword_args 5 99 5 106 50 1239 50 1243
loops-times 5 23 5 26 50 64 50 57
object-new 5 268 5 317 50 298 50 495
respond_to 5 139 5 139 50 3889 50 3905
ruby-xor 5 236 5 243 50 1314 50 1290
send_bmethod 5 116 5 125 50 5539 50 5543
send_cfunc_block 5 106 5 100 50 353 50 332
send_rubyfunc_block 5 251 5 254 50 6919 50 6933
setivar 5 360 5 396 50 4925 50 4976
setivar_object 5 341 5 336 50 753 50 611
setivar_young 5 342 5 338 50 795 50 637
str_concat 5 391 5 441 50 1199 50 1145
structaref 5 156 5 190 50 1809 50 1881
structaset 5 201 5 201 50 395 50 339
throw 5 1088 5 1190 50 1399 50 1450

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) 1548199 1273373 205 2579 0 0% 0 0 73.301783
chunky-png (click) 321395 305069 79 1373 1 0% 0 0 39.10468
erubi-rails (click) 1376987 1173036 267 3623 22 0% 0 0 96.497642
hexapdf (click) 1522977 1355128 594 15656 44 0% 0 0 437.627271
liquid-c (click) 556530 479837 114 2228 5 0% 0 0 60.379038
liquid-compile (click) 481097 400542 146 2728 2 0% 0 0 81.035684
liquid-render (click) 664369 629629 131 2946 8 0% 0 0 79.501088
lobsters (click) 8506737 7245012 3101 62222 118 0% 0 0 2089.1682
mail (click) 865542 819419 342 7700 40 0% 0 0 213.720551
psych-load (click) 288657 266573 61 828 2 0% 0 0 23.582996
railsbench (click) 3363460 2844528 1605 19664 47 0% 0 0 551.507905
rubocop (click) 5761628 4933435 3001 56853 127 0% 6 0 1663.945722
ruby-lsp (click) 959227 789783 342 6701 44 0% 1 0 181.195224
sequel (click) 494963 428921 11 119 0 0% 0 0 4.001731
shipit (click) 7737761 6474339 3345 53384 181 0% 1 0 1829.970937
addressable-equality (click) 320058 272278 44 1390 1 0% 0 0 34.762418
addressable-getters (click) 281680 249580 26 905 0 0% 0 0 21.997036
addressable-join (click) 284922 222638 24 941 0 0% 0 0 23.645204
addressable-merge (click) 284948 241575 27 896 0 0% 0 0 22.409081
addressable-new (click) 261291 216347 21 591 0 0% 0 0 14.531107
addressable-normalize (click) 317546 261346 43 1372 1 0% 0 0 33.520693
addressable-parse (click) 282270 216044 26 880 0 0% 0 0 21.580547
addressable-setters (click) 260018 225009 20 582 0 0% 0 0 14.290815
addressable-to-s (click) 278824 220990 26 849 0 0% 0 0 20.537562
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.852527
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.079291
erubi (click) 248592 240500 6 134 0 0% 0 0 3.99386
etanni (click) 32930 35718 8 114 0 0% 0 0 3.620667
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.024342
fluentd (click) 489451 424834 7 115 0 0% 0 0 3.781303
graphql (click) 410442 378293 73 1921 19 0% 0 0 53.776941
graphql-native (click) 354644 319597 39 532 0 0% 0 0 14.019347
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.872363
lee (click) 318622 313920 49 1097 0 0% 0 0 31.348258
matmul (click) 11103 4709 8 136 0 0% 0 0 4.226124
nbody (click) 14448 21176 6 251 0 0% 0 0 6.169882
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.348079
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.549462
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 73.003932
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 44.443016
rack (click) 281168 257433 35 580 0 0% 0 0 14.888884
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.719913
rubyboy (click) 704110 646861 154 6864 42 0% 0 0 166.519141
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.254053
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.476471
tinygql (click) 301218 280582 59 1031 5 0% 0 0 27.271672
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1923.65378
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.065992
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.091899
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.516035
fib (click) 2659 2995 3 30 0 0% 0 0 1.111829
getivar (click) 3789 6778 3 79 0 0% 0 0 1.892163
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334664
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.837786
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.898492
object-new (click) 2406 2818 2 36 0 0% 0 0 1.12152
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13467
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.83608
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.753283
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.254489
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.481229
setivar (click) 2783 3726 3 46 0 0% 0 0 1.237608
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.4303
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.732268
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.453766
structaref (click) 4407 9095 3 88 0 0% 0 0 2.383838
structaset (click) 3926 5614 3 70 0 0% 0 0 1.744792
throw (click) 5953 4624 5 53 0 0% 0 0 1.802358

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.