Ruby Benchmarks

Details for Benchmarks at 2025-12-03 00:40:48 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 92.8% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 100.5% faster than CRuby 4.0.0dev
  • 3.7% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 12 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 87 50 194 50 202
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 420 5 378 50 626 50 546
liquid-compile 5 415 5 467 50 553 50 682
liquid-render 5 168 5 167 50 414 50 383
lobsters 5 19 5 20 50 10 50 10
mail 5 195 5 150 50 252 50 213
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 246 50 252
ruby-lsp 5 143 5 146 50 241 50 244
sequel 5 422 5 437 50 584 50 599
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 12 50 10
addressable-getters 5 165 5 167 50 184 50 187
addressable-join 5 73 5 53 50 65 50 55
addressable-merge 5 160 5 154 50 222 50 212
addressable-new 5 355 5 341 50 523 50 491
addressable-normalize 5 53 5 53 50 60 50 57
addressable-parse 5 104 5 102 50 105 50 103
addressable-setters 5 185 5 180 50 231 50 222
addressable-to-s 5 163 5 167 50 182 50 186
binarytrees 5 82 5 83 50 135 50 129
blurhash 5 83 5 87 50 143 50 144
erubi 5 131 5 144 50 135 50 143
etanni 5 99 5 71 50 72 50 36
fannkuchredux 5 54 5 56 50 101 50 99
fluentd 5 56 5 61 50 20 50 26
graphql 5 372 5 463 50 536 50 916
graphql-native 5 59 5 80 50 22 50 62
knucleotide 5 164 5 164 50 117 50 118
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 53 50 94 50 90
nbody 5 246 5 261 50 676 50 639
nqueens 5 116 5 126 50 556 50 569
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 186 50 706 50 770
protoboeuf-encode 5 197 5 211 50 831 50 768
rack 5 439 5 448 50 713 50 697
ruby-json 5 82 5 97 50 47 50 69
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 159
tinygql 5 42 5 43 50 36 50 49
30k_ifelse 5 28 5 28 50 184 50 185
30k_methods 5 38 5 40 50 456 50 451
attr_accessor 5 157 5 197 50 1836 50 1922
cfunc_itself 5 348 5 363 50 1254 50 1258
fib 5 124 5 139 50 938 50 939
getivar 5 218 5 336 50 2316 50 2437
getivar-module 5 104 5 142 50 90 50 270
keyword_args 5 100 5 107 50 1239 50 1243
loops-times 5 23 5 26 50 63 50 56
object-new 5 268 5 317 50 296 50 490
respond_to 5 139 5 139 50 3890 50 3900
ruby-xor 5 236 5 253 50 1314 50 1290
send_bmethod 5 116 5 123 50 5539 50 5543
send_cfunc_block 5 106 5 99 50 353 50 333
send_rubyfunc_block 5 252 5 253 50 6922 50 6931
setivar 5 360 5 397 50 4925 50 4977
setivar_object 5 341 5 336 50 754 50 595
setivar_young 5 341 5 339 50 797 50 637
str_concat 5 390 5 454 50 1198 50 1188
structaref 5 156 5 186 50 1813 50 1874
structaset 5 202 5 233 50 397 50 356
throw 5 1086 5 1162 50 1416 50 1401

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) 1549650 1273934 205 2579 0 0% 0 0 73.215301
chunky-png (click) 322295 264993 79 1381 1 0% 0 0 39.279401
erubi-rails (click) 1383084 1147131 267 3712 22 0% 0 0 100.161795
hexapdf (click) 1525693 1307464 593 15657 44 0% 0 0 435.768969
liquid-c (click) 556533 504393 114 2228 5 0% 0 0 60.568787
liquid-compile (click) 477107 445764 146 2683 2 0% 0 0 77.024687
liquid-render (click) 662937 636279 131 2946 8 0% 0 0 79.687708
lobsters (click) 8509820 7078280 3102 62254 118 0% 0 0 2182.202087
mail (click) 865745 835887 342 7702 40 0% 0 0 213.825591
psych-load (click) 285200 230725 61 828 2 0% 0 0 23.923366
railsbench (click) 3353448 2798675 1605 19564 47 0% 0 0 548.247025
rubocop (click) 5760368 4998320 3001 56850 127 0% 6 0 1662.295701
ruby-lsp (click) 951291 814068 342 6712 44 0% 1 0 181.320939
sequel (click) 497445 382327 11 119 0 0% 0 0 3.810944
shipit (click) 7609348 6499062 3263 51847 180 0% 0 0 1717.063231
addressable-equality (click) 319623 280142 44 1387 1 0% 0 0 34.295771
addressable-getters (click) 270654 245291 26 863 0 0% 0 0 21.04008
addressable-join (click) 285328 280323 24 941 0 0% 0 0 23.6975
addressable-merge (click) 285108 258170 27 898 0 0% 0 0 22.340603
addressable-new (click) 259783 239068 21 563 0 0% 0 0 14.022391
addressable-normalize (click) 315375 283765 43 1342 1 0% 0 0 33.147957
addressable-parse (click) 282225 265147 26 880 0 0% 0 0 21.610624
addressable-setters (click) 259973 249536 20 582 0 0% 0 0 14.252721
addressable-to-s (click) 279121 237655 26 849 0 0% 0 0 20.54746
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.845315
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.145567
erubi (click) 244372 251905 6 134 0 0% 0 0 3.922341
etanni (click) 32930 35718 8 114 0 0% 0 0 3.633674
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.077705
fluentd (click) 490483 401136 7 115 0 0% 0 0 3.690512
graphql (click) 398528 356961 73 1921 18 0% 0 0 53.584329
graphql-native (click) 355194 279666 39 532 0 0% 0 0 13.733648
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.7966
lee (click) 317459 304703 49 1097 0 0% 0 0 31.473327
matmul (click) 11103 4709 8 136 0 0% 0 0 4.217514
nbody (click) 14448 21176 6 251 0 0% 0 0 6.157174
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.38023
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.548515
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 73.115954
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 44.225705
rack (click) 281460 249569 35 580 0 0% 0 0 15.121244
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.774885
rubyboy (click) 704154 622314 154 6864 42 0% 0 0 166.981727
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.434676
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.630612
tinygql (click) 301212 239602 59 1031 5 0% 0 0 27.112612
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1923.45604
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.759962
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.112276
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.5323
fib (click) 2659 2995 3 30 0 0% 0 0 1.128966
getivar (click) 3789 6778 3 79 0 0% 0 0 1.92233
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.282903
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.855051
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.934437
object-new (click) 2406 2818 2 36 0 0% 0 0 1.115271
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.167506
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.851631
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.753715
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.255403
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.490336
setivar (click) 2783 3726 3 46 0 0% 0 0 1.281198
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.399827
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.717308
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.447255
structaref (click) 4407 9095 3 88 0 0% 0 0 2.359345
structaset (click) 3926 5614 3 70 0 0% 0 0 1.698815
throw (click) 5953 4624 5 53 0 0% 0 0 1.844509

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.