Ruby Benchmarks

Details for Benchmarks at 2025-12-18 00:39:08 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 94.4% faster than CRuby 4.0.0dev
  • 4.6% faster than YJIT 3.4.7
On railsbench it is
  • 113.8% faster than CRuby 4.0.0dev
  • 12.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 9 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 89 5 99 50 191 50 236
chunky-png 5 31 5 33 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 424 50 628 50 616
liquid-compile 5 417 5 472 50 584 50 708
liquid-render 5 171 5 174 50 432 50 421
lobsters 5 19 5 20 50 10 50 10
mail 5 195 5 196 50 252 50 257
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 247 50 248
ruby-lsp 5 141 5 147 50 232 50 243
sequel 5 429 5 436 50 597 50 602
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 163 5 169 50 183 50 192
addressable-join 5 73 5 76 50 66 50 67
addressable-merge 5 159 5 155 50 223 50 215
addressable-new 5 352 5 346 50 526 50 501
addressable-normalize 5 53 5 53 50 59 50 57
addressable-parse 5 103 5 103 50 104 50 107
addressable-setters 5 185 5 179 50 229 50 221
addressable-to-s 5 163 5 167 50 183 50 188
binarytrees 5 82 5 85 50 136 50 140
blurhash 5 83 5 87 50 143 50 145
erubi 5 138 5 145 50 133 50 145
etanni 5 98 5 68 50 71 50 33
fannkuchredux 5 54 5 57 50 102 50 103
fluentd 5 56 5 59 50 20 50 27
graphql 5 360 5 458 50 571 50 933
graphql-native 5 59 5 86 50 23 50 66
knucleotide 5 162 5 159 50 118 50 113
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 51 50 94 50 96
nbody 5 247 5 260 50 676 50 705
nqueens 5 116 5 127 50 556 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 179 50 706 50 671
protoboeuf-encode 5 198 5 205 50 832 50 797
rack 5 439 5 456 50 708 50 696
ruby-json 5 82 5 94 50 50 50 65
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 157 50 164
tinygql 5 42 5 43 50 40 50 46
30k_ifelse 5 28 5 28 50 185 50 180
30k_methods 5 38 5 40 50 454 50 457
attr_accessor 5 157 5 219 50 1833 50 1951
cfunc_itself 5 347 5 353 50 1255 50 1259
fib 5 124 5 142 50 940 50 939
getivar 5 217 5 342 50 2316 50 2442
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 109 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 362 50 297 50 671
respond_to 5 139 5 140 50 3889 50 3907
ruby-xor 5 237 5 243 50 1313 50 1290
send_bmethod 5 116 5 126 50 5539 50 5544
send_cfunc_block 5 107 5 106 50 353 50 356
send_rubyfunc_block 5 251 5 250 50 6921 50 6924
setivar 5 360 5 459 50 4924 50 5025
setivar_object 5 341 5 340 50 749 50 613
setivar_young 5 341 5 341 50 797 50 642
str_concat 5 390 5 430 50 1201 50 1141
structaref 5 157 5 201 50 1811 50 1900
structaset 5 203 5 259 50 395 50 513
throw 5 1089 5 1297 50 1399 50 1591

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) 1542777 1222410 203 2638 0 0% 0 0 75.510291
chunky-png (click) 320961 296143 79 1373 1 0% 0 0 39.059704
erubi-rails (click) 1365573 1240006 268 3624 22 0% 0 0 95.280891
hexapdf (click) 1522408 1337220 593 15664 44 0% 0 0 436.731988
liquid-c (click) 556983 480139 114 2224 5 0% 0 0 59.458224
liquid-compile (click) 480815 425307 146 2733 2 0% 0 0 80.318531
liquid-render (click) 663506 595698 131 2946 8 0% 0 0 79.495937
lobsters (click) 8657793 7222522 3113 63913 117 0% 0 0 2116.021704
mail (click) 864161 808708 342 7700 40 0% 0 0 214.061637
psych-load (click) 288196 233002 61 828 2 0% 0 0 24.023809
railsbench (click) 3336372 2788322 1590 19696 97 0% 0 0 551.030342
rubocop (click) 5761424 4956795 3002 56859 126 0% 6 0 1655.757652
ruby-lsp (click) 953726 847243 343 6744 45 0% 1 0 181.089735
sequel (click) 495698 404166 11 119 0 0% 0 0 4.11117
shipit (click) 7605443 6380758 3270 51967 181 0% 0 0 1713.494079
addressable-equality (click) 319403 262584 44 1406 1 0% 0 0 35.080824
addressable-getters (click) 266619 223579 26 863 0 0% 0 0 20.965636
addressable-join (click) 284530 221864 24 941 0 0% 0 0 23.480411
addressable-merge (click) 283679 231128 27 898 0 0% 0 0 22.021511
addressable-new (click) 259799 197715 21 563 0 0% 0 0 14.331012
addressable-normalize (click) 314251 241077 43 1328 1 0% 0 0 32.931371
addressable-parse (click) 272673 228743 26 880 0 0% 0 0 21.669556
addressable-setters (click) 258832 214678 20 582 0 0% 0 0 14.568728
addressable-to-s (click) 278759 212320 26 849 0 0% 0 0 20.708277
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.880897
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.750032
erubi (click) 248114 206969 6 134 0 0% 0 0 3.899467
etanni (click) 33287 36246 8 113 0 0% 0 0 3.527997
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.933604
fluentd (click) 486216 361462 7 115 0 0% 0 0 3.760021
graphql (click) 401093 350288 73 1921 19 0% 0 0 54.183874
graphql-native (click) 355777 286318 39 532 0 0% 0 0 13.96741
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.476607
lee (click) 317123 295032 49 1097 0 0% 0 0 31.513681
matmul (click) 11103 4709 8 136 0 0% 0 0 4.367162
nbody (click) 14448 21176 6 251 0 0% 0 0 6.174872
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.348228
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.862503
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.457664
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.553919
rack (click) 283534 228207 35 626 0 0% 0 0 16.357263
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.648513
rubyboy (click) 703647 604635 154 6864 42 0% 0 0 166.712558
rubykon (click) 148906 173779 137 2106 3 0% 0 0 57.142164
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.119505
tinygql (click) 300034 262048 59 1031 5 0% 0 0 27.079042
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1926.139572
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.983822
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.108137
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.581295
fib (click) 2659 2995 3 30 0 0% 0 0 1.151776
getivar (click) 3789 6778 3 79 0 0% 0 0 1.948355
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.3834
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.88444
loops-times (click) 7093 8387 5 100 0 0% 0 0 3.068954
object-new (click) 2406 2818 2 36 0 0% 0 0 1.065416
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.115133
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.823367
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.798138
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.185787
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.535482
setivar (click) 2783 3726 3 46 0 0% 0 0 1.251002
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.44662
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.71976
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.488547
structaref (click) 4407 9095 3 88 0 0% 0 0 2.376245
structaset (click) 3926 5614 3 70 0 0% 0 0 1.777475
throw (click) 5953 4624 5 53 0 0% 0 0 1.832217

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.