Ruby Benchmarks

Details for Benchmarks at 2025-10-29 01:03:12 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 90.0% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 103.5% faster than CRuby 3.5.0dev
  • 2.1% faster than YJIT 3.4.7
x86_64 runtime: 7 hours, 4 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 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 84 5 85 50 193 50 212
chunky-png 5 31 5 32 50 33 50 26
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 397 50 624 50 516
liquid-compile 5 418 5 465 50 546 50 708
liquid-render 5 171 5 166 50 431 50 379
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 181 50 253 50 225
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 142 5 144 50 241 50 241
sequel 5 419 5 417 50 580 50 568
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 81 50 136 50 128
blurhash 5 83 5 88 50 143 50 144
erubi 5 136 5 133 50 134 50 126
etanni 5 99 5 65 50 71 50 31
fannkuchredux 5 53 5 56 50 102 50 100
fluentd 5 62 5 57 50 25 50 27
graphql 5 374 5 453 50 571 50 901
graphql-native 5 57 5 82 50 22 50 62
knucleotide 5 163 5 150 50 118 50 105
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 53 50 95 50 90
nbody 5 246 5 290 50 677 50 698
nqueens 5 116 5 129 50 557 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 706 50 693
protoboeuf-encode 5 197 5 205 50 833 50 777
rack 5 440 5 439 50 707 50 680
ruby-json 5 82 5 79 50 47 50 46
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 158
tinygql 5 41 5 41 50 36 50 45
30k_ifelse 5 28 5 27 50 183 50 183
30k_methods 5 38 5 37 50 456 50 456
attr_accessor 5 157 5 196 50 1835 50 1922
cfunc_itself 5 349 5 351 50 1255 50 1258
fib 5 124 5 141 50 940 50 940
getivar 5 217 5 308 50 2315 50 2418
keyword_args 5 100 5 95 50 1240 50 1242
loops-times 5 23 5 25 50 64 50 56
object-new 5 269 5 349 50 296 50 594
respond_to 5 139 5 138 50 3892 50 3902
ruby-xor 5 237 5 249 50 1311 50 1276
send_bmethod 5 116 5 104 50 5539 50 5541
send_cfunc_block 5 105 5 106 50 353 50 346
send_rubyfunc_block 5 244 5 247 50 6924 50 6926
setivar 5 360 5 350 50 4928 50 4921
setivar_object 5 341 5 326 50 749 50 546
setivar_young 5 341 5 327 50 794 50 562
str_concat 5 390 5 415 50 1199 50 1045
throw 5 1090 5 1139 50 1419 50 1529

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) 1549994 1323203 205 2579 0 0% 0 0 73.415185
chunky-png (click) 317422 284087 74 1322 1 0% 0 0 37.080064
erubi-rails (click) 1962635 1738114 261 3625 22 0% 0 0 98.16046
hexapdf (click) 1528574 1353963 593 15704 44 0% 0 0 438.000192
liquid-c (click) 544705 482973 114 2228 5 0% 0 0 60.080083
liquid-compile (click) 478151 372555 146 2714 2 0% 0 0 79.133232
liquid-render (click) 661399 568958 131 2946 8 0% 0 0 80.396971
lobsters (click) 8440576 6943155 3098 62205 118 0% 0 0 2184.209046
mail (click) 859554 796639 342 7674 36 0% 0 0 212.56979
psych-load (click) 287684 232665 61 832 2 0% 0 0 24.00785
railsbench (click) 3353600 2989745 1605 19603 47 0% 0 0 548.709401
rubocop (click) 5760175 5047038 3001 56844 125 0% 6 0 1663.803048
ruby-lsp (click) 962736 850203 347 6796 44 0% 1 0 182.914877
sequel (click) 493940 419577 11 119 0 0% 0 0 3.969038
shipit (click) 7591755 6451049 3262 51753 180 0% 0 0 1703.889814
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.841142
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.601293
erubi (click) 235294 209502 6 134 0 0% 0 0 3.972862
etanni (click) 32930 35718 8 114 0 0% 0 0 3.585744
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.773732
fluentd (click) 490354 433536 7 115 0 0% 0 0 3.691976
graphql (click) 409081 343806 73 1921 19 0% 0 0 53.889429
graphql-native (click) 353547 302187 39 532 0 0% 0 0 13.92426
knucleotide (click) 9997 11103 7 113 0 0% 0 0 7.344411
lee (click) 306535 275816 49 1097 0 0% 0 0 31.420311
matmul (click) 11103 4709 8 136 0 0% 0 0 4.227654
nbody (click) 14448 21176 6 251 0 0% 0 0 6.080098
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.243849
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.484961
protoboeuf (click) 170129 177717 12 2837 0 0% 0 0 72.225797
protoboeuf-encode (click) 243065 283735 14 1816 0 0% 0 0 44.253092
rack (click) 268771 243910 35 580 0 0% 0 0 15.090761
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.678753
rubyboy (click) 702323 587357 154 6864 42 0% 0 0 167.053994
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.696868
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.126541
tinygql (click) 289482 242876 59 1037 5 0% 0 0 27.091473
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1931.878589
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.407077
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.134617
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.546963
fib (click) 2659 2995 3 30 0 0% 0 0 1.093222
getivar (click) 3789 6778 3 79 0 0% 0 0 1.947566
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.829433
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.891141
object-new (click) 2406 2818 2 36 0 0% 0 0 1.082675
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.134236
ruby-xor (click) 6026 856 4 105 0 0% 0 0 2.814355
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.758308
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.271544
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.478718
setivar (click) 2783 3726 3 46 0 0% 0 0 1.293081
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.442808
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.761719
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.464214
throw (click) 5953 4624 5 53 0 0% 0 0 1.829096

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.