Ruby Benchmarks

Details for Benchmarks at 2025-12-31 00:43:24 UTC

YJIT metrics from the ruby-bench suite using Ruby 9d37155cfc.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.1% faster than CRuby 4.1.0dev
  • 3.3% faster than YJIT 3.4.7
On railsbench it is
  • 115.5% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 11 minutes
aarch64 runtime: 7 hours, 6 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 90 5 96 50 199 50 221
chunky-png 5 31 5 33 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 420 50 624 50 626
liquid-compile 5 418 5 468 50 584 50 707
liquid-render 5 171 5 174 50 433 50 434
mail 5 194 5 187 50 253 50 252
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 246 50 247
ruby-lsp 5 140 5 146 50 234 50 247
sequel 5 429 5 420 50 581 50 587
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 187
addressable-join 5 73 5 75 50 65 50 68
addressable-merge 5 159 5 154 50 221 50 211
addressable-new 5 354 5 345 50 524 50 498
addressable-normalize 5 53 5 52 50 59 50 55
addressable-parse 5 103 5 103 50 104 50 104
addressable-setters 5 184 5 179 50 231 50 220
addressable-to-s 5 163 5 164 50 182 50 187
binarytrees 5 82 5 82 50 136 50 135
blurhash 5 83 5 88 50 143 50 145
erubi 5 137 5 144 50 126 50 149
etanni 5 99 5 69 50 71 50 35
fannkuchredux 5 54 5 57 50 101 50 105
fluentd 5 56 5 60 50 20 50 26
graphql 5 371 5 471 50 571 50 905
graphql-native 5 58 5 86 50 22 50 66
knucleotide 5 163 5 151 50 118 50 105
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 54 50 94 50 96
nbody 5 247 5 273 50 676 50 704
nqueens 5 116 5 121 50 556 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 180 50 706 50 727
protoboeuf-encode 5 198 5 204 50 828 50 780
rack 5 422 5 447 50 706 50 687
ruby-json 5 82 5 96 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 50 50 156 50 161
tinygql 5 39 5 43 50 36 50 47
30k_ifelse 5 28 5 28 50 184 50 181
30k_methods 5 38 5 41 50 456 50 455
attr_accessor 5 157 5 198 50 1833 50 1919
cfunc_itself 5 348 5 344 50 1255 50 1259
fib 5 124 5 142 50 939 50 939
getivar 5 217 5 340 50 2313 50 2442
getivar-module 5 104 5 143 50 90 50 270
keyword_args 5 100 5 109 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 61
object-new 5 268 5 366 50 298 50 682
respond_to 5 139 5 141 50 3888 50 3898
ruby-xor 5 236 5 254 50 1313 50 1288
send_bmethod 5 116 5 123 50 5539 50 4527
send_cfunc_block 5 106 5 106 50 353 50 338
send_rubyfunc_block 5 250 5 242 50 6922 50 6926
setivar 5 360 5 475 50 4926 50 5036
setivar_object 5 341 5 289 50 750 50 532
setivar_young 5 341 5 292 50 794 50 551
str_concat 5 389 5 448 50 1199 50 1182
structaref 5 157 5 199 50 1812 50 1895
structaset 5 202 5 260 50 396 50 515
throw 5 1089 5 1224 50 1393 50 1575

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) 1541359 1287134 203 2635 0 0% 0 0 75.14262
chunky-png (click) 317543 292051 79 1373 1 0% 0 0 38.810379
erubi-rails (click) 1369124 1205278 268 3664 22 0% 0 0 97.424806
hexapdf (click) 1521217 1319956 593 15656 44 0% 0 0 433.983729
liquid-c (click) 554375 444073 114 2228 5 0% 0 0 60.323744
liquid-compile (click) 477151 436600 146 2716 2 0% 0 0 79.58615
liquid-render (click) 663512 538325 131 2946 8 0% 0 0 79.510209
mail (click) 861858 765010 345 7721 40 0% 0 0 216.796561
psych-load (click) 287917 273705 61 828 2 0% 0 0 23.637353
railsbench (click) 3345973 2834835 1591 19735 97 0% 0 0 589.891452
rubocop (click) 5755762 4878318 3002 56855 125 0% 6 0 1659.567464
ruby-lsp (click) 959700 929682 343 6720 44 0% 1 0 180.830276
sequel (click) 502357 430684 11 119 0 0% 0 0 3.981512
shipit (click) 7253795 6339533 3380 53617 170 0% 1 0 1825.766853
addressable-equality (click) 313593 297396 44 1381 0 0% 0 0 34.319298
addressable-getters (click) 271981 221436 26 863 0 0% 0 0 21.015408
addressable-join (click) 279533 257159 24 941 0 0% 0 0 23.374596
addressable-merge (click) 282729 247064 27 896 0 0% 0 0 22.451988
addressable-new (click) 255969 234502 21 595 0 0% 0 0 15.142352
addressable-normalize (click) 312424 280108 43 1328 1 0% 0 0 32.589517
addressable-parse (click) 280041 237888 26 880 0 0% 0 0 21.999193
addressable-setters (click) 257755 214085 20 582 0 0% 0 0 14.666988
addressable-to-s (click) 276932 218583 26 849 0 0% 0 0 20.748203
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.829174
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.582503
erubi (click) 247835 190308 6 134 0 0% 0 0 3.933907
etanni (click) 32832 35642 8 113 0 0% 0 0 3.480385
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.682399
fluentd (click) 480964 397021 7 115 0 0% 0 0 3.774382
graphql (click) 405250 346884 73 1921 19 0% 0 0 54.21105
graphql-native (click) 354516 319575 39 532 0 0% 0 0 13.961723
knucleotide (click) 9997 11103 7 113 0 0% 0 0 8.363911
lee (click) 314628 251589 49 1097 0 0% 0 0 31.71524
matmul (click) 11103 4709 8 136 0 0% 0 0 4.280455
nbody (click) 14448 21176 6 251 0 0% 0 0 6.08369
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.197642
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.969062
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 71.960424
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.144377
rack (click) 280316 239952 35 580 0 0% 0 0 14.974072
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.580385
rubyboy (click) 701308 610501 154 6864 42 0% 0 0 166.032677
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.115674
sudoku (click) 51704 65882 7 870 0 0% 0 0 22.840057
tinygql (click) 300500 238591 59 1031 5 0% 0 0 27.467324
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1928.632748
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.862436
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.0912
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.540102
fib (click) 2659 2995 3 30 0 0% 0 0 1.148315
getivar (click) 3789 6778 3 79 0 0% 0 0 1.93754
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.300873
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.791292
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.911779
object-new (click) 2406 2818 2 36 0 0% 0 0 1.12508
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.111505
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.82447
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.799758
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.145852
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.477493
setivar (click) 2783 3726 3 46 0 0% 0 0 1.265041
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.413864
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.719289
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.493045
structaref (click) 4407 9095 3 88 0 0% 0 0 2.367538
structaset (click) 3926 5614 3 70 0 0% 0 0 1.755845
throw (click) 5953 4624 5 53 0 0% 0 0 1.796824

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.