Ruby Benchmarks

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

YJIT metrics from the ruby-bench suite using Ruby 290fa0d8b4.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.4% faster than CRuby 4.1.0dev
  • 4.4% faster than YJIT 3.4.7
On railsbench it is
  • 114.2% faster than CRuby 4.1.0dev
  • 11.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 13 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 99 50 200 50 230
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 421 5 423 50 627 50 635
liquid-compile 5 418 5 472 50 551 50 713
liquid-render 5 171 5 172 50 430 50 423
mail 5 194 5 191 50 253 50 262
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 246 50 246
ruby-lsp 5 145 5 148 50 254 50 243
sequel 5 426 5 433 50 606 50 604
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 168 50 182 50 192
addressable-join 5 73 5 76 50 66 50 69
addressable-merge 5 160 5 158 50 222 50 217
addressable-new 5 354 5 354 50 523 50 519
addressable-normalize 5 54 5 54 50 59 50 56
addressable-parse 5 103 5 105 50 104 50 107
addressable-setters 5 184 5 181 50 229 50 226
addressable-to-s 5 163 5 170 50 183 50 194
binarytrees 5 82 5 84 50 136 50 137
blurhash 5 83 5 88 50 143 50 145
erubi 5 130 5 142 50 138 50 140
etanni 5 97 5 68 50 71 50 33
fannkuchredux 5 55 5 54 50 101 50 98
fluentd 5 56 5 62 50 20 50 27
graphql 5 359 5 464 50 532 50 923
graphql-native 5 58 5 84 50 22 50 63
knucleotide 5 162 5 155 50 117 50 109
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 51 50 94 50 96
nbody 5 247 5 256 50 677 50 703
nqueens 5 116 5 128 50 557 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 706 50 652
protoboeuf-encode 5 198 5 193 50 828 50 776
rack 5 437 5 455 50 704 50 698
ruby-json 5 84 5 97 50 50 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 44 50 37 50 45
30k_ifelse 5 28 5 28 50 184 50 180
30k_methods 5 38 5 40 50 445 50 453
attr_accessor 5 157 5 209 50 1834 50 1939
cfunc_itself 5 347 5 351 50 1255 50 1259
fib 5 109 5 143 50 939 50 939
getivar 5 217 5 314 50 2315 50 2420
getivar-module 5 104 5 142 50 90 50 271
keyword_args 5 100 5 106 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 61
object-new 5 268 5 361 50 297 50 677
respond_to 5 139 5 141 50 3889 50 3898
ruby-xor 5 236 5 250 50 1314 50 1289
send_bmethod 5 116 5 123 50 5538 50 4527
send_cfunc_block 5 106 5 106 50 353 50 343
send_rubyfunc_block 5 221 5 250 50 6924 50 6928
setivar 5 360 5 482 50 4927 50 5043
setivar_object 5 341 5 330 50 750 50 509
setivar_young 5 341 5 330 50 799 50 521
str_concat 5 390 5 428 50 1201 50 1136
structaref 5 156 5 190 50 1809 50 1880
structaset 5 200 5 268 50 398 50 513
throw 5 1089 5 1269 50 1426 50 1593

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) 1541447 1337252 203 2648 0 0% 0 0 75.146819
chunky-png (click) 319964 270693 79 1373 1 0% 0 0 38.883823
erubi-rails (click) 1369656 1188012 268 3684 22 0% 0 0 100.605948
hexapdf (click) 1518887 1325636 593 15652 44 0% 0 0 440.531204
liquid-c (click) 557597 456478 114 2241 5 0% 0 0 59.982747
liquid-compile (click) 477273 388179 146 2684 2 0% 0 0 78.210441
liquid-render (click) 662790 554181 131 2946 8 0% 0 0 79.007948
mail (click) 866447 844529 345 7722 40 0% 0 0 215.59551
psych-load (click) 287200 256724 61 828 2 0% 0 0 23.918073
railsbench (click) 3345639 2833567 1591 19734 97 0% 0 0 554.930045
rubocop (click) 5758643 4922476 3002 56865 126 0% 6 0 1667.231661
ruby-lsp (click) 959366 831299 342 6701 44 0% 1 0 181.031278
sequel (click) 501639 397261 11 119 0 0% 0 0 3.920472
shipit (click) 7527879 6270254 3281 51941 182 0% 0 0 1715.155917
addressable-equality (click) 304484 229772 44 1381 1 0% 0 0 34.554498
addressable-getters (click) 267033 232554 26 905 0 0% 0 0 21.781321
addressable-join (click) 281980 235757 24 941 0 0% 0 0 23.52506
addressable-merge (click) 270197 208169 27 896 0 0% 0 0 22.228101
addressable-new (click) 256563 227363 21 563 0 0% 0 0 14.32403
addressable-normalize (click) 311427 279283 43 1328 1 0% 0 0 32.785743
addressable-parse (click) 279323 229099 26 880 0 0% 0 0 21.764722
addressable-setters (click) 252603 218149 20 584 0 0% 0 0 14.845996
addressable-to-s (click) 275935 258718 26 849 0 0% 0 0 20.614818
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.834505
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.74959
erubi (click) 235994 217419 6 134 0 0% 0 0 4.031462
etanni (click) 33287 36246 8 113 0 0% 0 0 3.541028
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.768448
fluentd (click) 481974 357544 7 115 0 0% 0 0 3.769795
graphql (click) 397832 363373 73 1921 18 0% 0 0 54.179475
graphql-native (click) 353590 269728 39 532 0 0% 0 0 13.910953
knucleotide (click) 9997 11103 7 113 0 0% 0 0 8.054784
lee (click) 317085 303822 49 1097 0 0% 0 0 31.605745
matmul (click) 11103 4709 8 136 0 0% 0 0 4.258975
nbody (click) 14448 21176 6 251 0 0% 0 0 6.117612
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.215851
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.798091
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.557793
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.691145
rack (click) 282089 235111 35 626 0 0% 0 0 16.312643
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.65992
rubyboy (click) 691912 665385 154 6864 42 0% 0 0 167.845042
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.613351
sudoku (click) 51704 65882 7 870 0 0% 0 0 22.937863
tinygql (click) 301300 271003 59 1031 5 0% 0 0 27.396693
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1928.855333
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.224577
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.110018
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.518844
fib (click) 2659 2995 3 30 0 0% 0 0 1.145533
getivar (click) 3789 6778 3 79 0 0% 0 0 1.932031
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.312343
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.807186
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.911784
object-new (click) 2406 2818 2 36 0 0% 0 0 1.105462
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.126095
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.794437
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.812145
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.179034
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.489597
setivar (click) 2783 3726 3 46 0 0% 0 0 1.242037
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.407633
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.74929
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.468492
structaref (click) 4407 9095 3 88 0 0% 0 0 2.364462
structaset (click) 3926 5614 3 70 0 0% 0 0 1.713753
throw (click) 5953 4624 5 53 0 0% 0 0 1.751104

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.