Ruby Benchmarks

Details for Benchmarks at 2025-11-18 00:39:31 UTC

YJIT metrics from the ruby-bench suite using Ruby 02279f01ac.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 90.5% faster than CRuby 4.0.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 99.9% faster than CRuby 4.0.0dev
  • 1.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 1 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 83 5 88 50 190 50 226
chunky-png 5 31 5 33 50 32 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 402 50 627 50 566
liquid-compile 5 419 5 458 50 580 50 691
liquid-render 5 172 5 167 50 414 50 367
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 178 50 255 50 202
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 247 50 250
ruby-lsp 5 142 5 146 50 240 50 242
sequel 5 420 5 431 50 604 50 595
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 183 50 183
addressable-join 5 73 5 51 50 66 50 17
addressable-merge 5 161 5 152 50 222 50 205
addressable-new 5 355 5 338 50 524 50 482
addressable-normalize 5 54 5 52 50 59 50 54
addressable-parse 5 104 5 101 50 104 50 100
addressable-setters 5 185 5 174 50 229 50 210
addressable-to-s 5 163 5 163 50 183 50 183
binarytrees 5 82 5 82 50 136 50 127
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 134 50 136 50 126
etanni 5 98 5 68 50 71 50 35
fannkuchredux 5 55 5 56 50 102 50 99
fluentd 5 56 5 60 50 20 50 30
graphql 5 375 5 452 50 571 50 933
graphql-native 5 59 5 79 50 22 50 62
knucleotide 5 163 5 162 50 118 50 116
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 51 50 94 50 91
nbody 5 246 5 271 50 676 50 661
nqueens 5 116 5 127 50 556 50 559
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 186 50 707 50 740
protoboeuf-encode 5 196 5 208 50 832 50 795
rack 5 438 5 431 50 721 50 689
ruby-json 5 84 5 98 50 50 50 70
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 47 50 156 50 149
tinygql 5 42 5 43 50 35 50 48
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 40 50 449 50 455
attr_accessor 5 153 5 192 50 1834 50 1913
cfunc_itself 5 347 5 347 50 1254 50 1259
fib 5 124 5 142 50 940 50 940
getivar 5 212 5 289 50 2315 50 2400
keyword_args 5 100 5 108 50 1239 50 1242
loops-times 5 23 5 24 50 64 50 57
object-new 5 268 5 310 50 297 50 452
respond_to 5 139 5 139 50 3886 50 3903
ruby-xor 5 237 5 249 50 1314 50 1289
send_bmethod 5 116 5 125 50 5538 50 5536
send_cfunc_block 5 106 5 105 50 353 50 337
send_rubyfunc_block 5 251 5 241 50 6924 50 6915
setivar 5 360 5 364 50 4924 50 4941
setivar_object 5 341 5 317 50 748 50 600
setivar_young 5 341 5 322 50 798 50 630
str_concat 5 390 5 418 50 1198 50 1170
structaref 5 156 5 187 50 1810 50 1873
structaset 5 202 5 223 50 396 50 356
throw 5 1089 5 1143 50 1407 50 1387

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) 1550259 1323673 205 2579 0 0% 0 0 76.740801
chunky-png (click) 316986 267680 74 1322 1 0% 0 0 37.612877
erubi-rails (click) 1380689 1217675 267 3729 22 0% 0 0 99.682882
hexapdf (click) 1513613 1296927 593 15679 44 0% 0 0 439.16542
liquid-c (click) 556018 479503 114 2228 5 0% 0 0 60.017861
liquid-compile (click) 481036 433620 146 2739 2 0% 0 0 81.476999
liquid-render (click) 663857 621103 131 2946 8 0% 0 0 79.354269
lobsters (click) 8522837 7188454 3101 62419 118 0% 0 0 2082.037349
mail (click) 865098 868134 342 7700 40 0% 0 0 213.367257
psych-load (click) 288908 242607 61 832 2 0% 0 0 23.607705
railsbench (click) 3356904 2869947 1605 19585 47 0% 0 0 545.389704
rubocop (click) 5760025 4973813 3001 56846 126 0% 6 0 1651.639018
ruby-lsp (click) 964226 852215 347 6778 44 0% 1 0 182.49445
sequel (click) 503098 472980 11 119 0 0% 0 0 4.130339
shipit (click) 7733603 6366074 3344 53409 181 0% 1 0 1759.338634
addressable-equality (click) 307470 275367 44 1407 1 0% 0 0 34.652982
addressable-getters (click) 279190 213866 26 863 0 0% 0 0 20.909943
addressable-join (click) 284650 230661 24 941 0 0% 0 0 23.314326
addressable-merge (click) 285031 249849 27 896 0 0% 0 0 21.894547
addressable-new (click) 259284 214079 21 565 0 0% 0 0 14.037124
addressable-normalize (click) 314365 274542 43 1330 1 0% 0 0 32.422042
addressable-parse (click) 282309 216097 26 880 0 0% 0 0 21.450215
addressable-setters (click) 259313 199760 20 582 0 0% 0 0 14.242871
addressable-to-s (click) 278456 253410 26 849 0 0% 0 0 20.383702
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.795786
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.917113
erubi (click) 250744 208472 6 134 0 0% 0 0 3.992573
etanni (click) 32930 35718 8 114 0 0% 0 0 3.588781
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.952882
fluentd (click) 490981 426168 7 115 0 0% 0 0 3.818325
graphql (click) 410051 361689 73 1921 19 0% 0 0 53.20159
graphql-native (click) 356655 263882 39 532 0 0% 0 0 13.758189
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.804872
lee (click) 318525 297515 49 1097 0 0% 0 0 30.995542
matmul (click) 11103 4709 8 136 0 0% 0 0 4.196146
nbody (click) 14448 21176 6 251 0 0% 0 0 6.11148
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.275645
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 109.998509
protoboeuf (click) 170129 251445 12 2837 0 0% 0 0 72.028303
protoboeuf-encode (click) 243065 308311 14 1816 0 0% 0 0 44.107142
rack (click) 281483 274272 35 580 0 0% 0 0 15.044868
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.752874
rubyboy (click) 703797 572918 154 6868 42 0% 0 0 166.049965
rubykon (click) 146441 162602 137 2076 3 0% 0 0 55.426349
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.490314
tinygql (click) 301472 256363 59 1037 5 0% 0 0 27.356778
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1915.087585
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.499899
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.094695
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498299
fib (click) 2659 2995 3 30 0 0% 0 0 1.149656
getivar (click) 3789 6778 3 79 0 0% 0 0 1.925477
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.813027
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.893718
object-new (click) 2406 2818 2 36 0 0% 0 0 1.117023
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.152939
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.820802
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.762981
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.302141
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.504001
setivar (click) 2783 3726 3 46 0 0% 0 0 1.30028
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.409192
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.718112
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.431933
structaref (click) 4407 9095 3 88 0 0% 0 0 2.302684
structaset (click) 3926 5614 3 70 0 0% 0 0 1.745793
throw (click) 5953 4624 5 53 0 0% 0 0 1.796295

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.