Ruby Benchmarks

Details for Benchmarks at 2025-12-24 00:42:26 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 97.7% faster than CRuby 4.0.0dev
  • 5.7% faster than YJIT 3.4.7
On railsbench it is
  • 115.9% faster than CRuby 4.0.0dev
  • 9.8% 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 92 5 98 50 191 50 236
chunky-png 5 31 5 33 50 33 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 419 5 423 50 626 50 627
liquid-compile 5 417 5 471 50 582 50 716
liquid-render 5 168 5 171 50 413 50 420
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 191 50 253 50 270
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 248 50 247
ruby-lsp 5 142 5 147 50 233 50 242
sequel 5 427 5 432 50 596 50 605
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 163 5 164 50 184 50 190
addressable-join 5 74 5 75 50 66 50 67
addressable-merge 5 159 5 152 50 223 50 216
addressable-new 5 354 5 341 50 526 50 507
addressable-normalize 5 53 5 52 50 59 50 55
addressable-parse 5 103 5 101 50 104 50 108
addressable-setters 5 183 5 177 50 232 50 226
addressable-to-s 5 163 5 164 50 183 50 188
binarytrees 5 82 5 85 50 136 50 139
blurhash 5 83 5 87 50 143 50 145
erubi 5 138 5 141 50 137 50 143
etanni 5 98 5 67 50 71 50 33
fannkuchredux 5 54 5 57 50 102 50 103
fluentd 5 56 5 58 50 19 50 30
graphql 5 369 5 474 50 573 50 924
graphql-native 5 58 5 87 50 22 50 68
knucleotide 5 163 5 158 50 117 50 112
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 50 50 94 50 94
nbody 5 247 5 259 50 676 50 707
nqueens 5 116 5 129 50 557 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 672
protoboeuf-encode 5 198 5 199 50 828 50 774
rack 5 439 5 444 50 704 50 696
ruby-json 5 82 5 95 50 46 50 66
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 156 50 162
tinygql 5 41 5 44 50 40 50 47
30k_ifelse 5 28 5 28 50 185 50 182
30k_methods 5 39 5 40 50 458 50 454
attr_accessor 5 157 5 222 50 1837 50 1956
cfunc_itself 5 347 5 358 50 1255 50 1259
fib 5 124 5 143 50 939 50 940
getivar 5 217 5 345 50 2315 50 2443
getivar-module 5 104 5 144 50 90 50 270
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 60
object-new 5 268 5 360 50 297 50 674
respond_to 5 139 5 138 50 3888 50 3902
ruby-xor 5 236 5 248 50 1315 50 1292
send_bmethod 5 116 5 121 50 5539 50 4527
send_cfunc_block 5 105 5 106 50 353 50 344
send_rubyfunc_block 5 251 5 249 50 6923 50 6925
setivar 5 360 5 469 50 4925 50 5036
setivar_object 5 341 5 335 50 751 50 615
setivar_young 5 341 5 336 50 795 50 638
str_concat 5 391 5 422 50 1201 50 1106
structaref 5 156 5 201 50 1811 50 1899
structaset 5 202 5 254 50 395 50 517
throw 5 1090 5 1280 50 1390 50 1557

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) 1543732 1321543 203 2645 0 0% 0 0 74.962053
chunky-png (click) 319671 254013 79 1373 1 0% 0 0 39.215474
erubi-rails (click) 1369457 1245155 268 3702 22 0% 0 0 99.188964
hexapdf (click) 1522256 1329417 594 15675 44 0% 0 0 439.078756
liquid-c (click) 556398 446905 114 2228 5 0% 0 0 60.293899
liquid-compile (click) 478065 381065 146 2701 2 0% 0 0 78.615362
liquid-render (click) 662564 570290 131 2946 8 0% 0 0 79.133574
lobsters (click) 8663209 7423604 3126 63959 117 0% 0 0 2106.680898
mail (click) 865873 803070 345 7721 40 0% 0 0 213.681432
psych-load (click) 287186 264828 61 828 2 0% 0 0 23.983894
railsbench (click) 3341512 2918702 1591 19697 97 0% 0 0 550.635438
rubocop (click) 5757017 4871482 3002 56842 126 0% 6 0 1658.674806
ruby-lsp (click) 959082 838924 342 6701 44 0% 1 0 179.122352
sequel (click) 502390 455536 11 119 0 0% 0 0 4.045033
shipit (click) 7520315 6275532 3282 51925 182 0% 0 0 1705.836638
addressable-equality (click) 316303 268110 44 1381 1 0% 0 0 34.247433
addressable-getters (click) 276428 210751 26 863 0 0% 0 0 20.709122
addressable-join (click) 283429 245407 24 941 0 0% 0 0 23.370892
addressable-merge (click) 282016 238295 27 896 0 0% 0 0 22.358055
addressable-new (click) 258315 221230 21 591 0 0% 0 0 15.049475
addressable-normalize (click) 311711 279531 43 1328 1 0% 0 0 32.636463
addressable-parse (click) 279328 229119 26 880 0 0% 0 0 21.694822
addressable-setters (click) 256859 221591 20 582 0 0% 0 0 14.673035
addressable-to-s (click) 276219 234390 26 849 0 0% 0 0 20.873161
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.83644
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.796199
erubi (click) 247396 198151 6 134 0 0% 0 0 3.93542
etanni (click) 32832 35642 8 113 0 0% 0 0 3.477186
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.841053
fluentd (click) 482288 366081 7 115 0 0% 0 0 3.739735
graphql (click) 409072 360490 73 1921 19 0% 0 0 54.325321
graphql-native (click) 347512 305372 39 532 0 0% 0 0 14.039357
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.422846
lee (click) 317085 271054 49 1097 0 0% 0 0 31.855649
matmul (click) 11103 4709 8 136 0 0% 0 0 4.252117
nbody (click) 14448 21176 6 251 0 0% 0 0 6.136416
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.282431
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.134834
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.183364
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.500624
rack (click) 279027 230599 35 580 0 0% 0 0 15.129212
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.638282
rubyboy (click) 703983 679370 154 6862 42 0% 0 0 166.942875
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.407633
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.072856
tinygql (click) 301498 264320 59 1031 5 0% 0 0 27.741423
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1922.322526
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.74095
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.12468
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.515117
fib (click) 2659 2995 3 30 0 0% 0 0 1.123679
getivar (click) 3789 6778 3 79 0 0% 0 0 1.919163
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.338469
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.856891
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.946486
object-new (click) 2406 2818 2 36 0 0% 0 0 1.047145
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.124644
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.853219
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.811425
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.150027
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.495786
setivar (click) 2783 3726 3 46 0 0% 0 0 1.247098
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.446447
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.750473
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.473756
structaref (click) 4407 9095 3 88 0 0% 0 0 2.393944
structaset (click) 3926 5614 3 70 0 0% 0 0 1.765397
throw (click) 5953 4624 5 53 0 0% 0 0 1.787371

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.