Ruby Benchmarks

Details for Benchmarks at 2025-10-26 01:03:24 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 89.9% faster than CRuby 3.5.0dev
  • 1.2% slower than YJIT 3.4.7
On railsbench it is
  • 114.0% faster than CRuby 3.5.0dev
  • 6.8% faster than YJIT 3.4.7
x86_64 runtime: 6 hours, 55 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 86 50 192 50 223
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 420 5 400 50 625 50 502
liquid-compile 5 417 5 466 50 586 50 674
liquid-render 5 172 5 167 50 436 50 381
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 180 50 253 50 223
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 247 50 245
ruby-lsp 5 140 5 147 50 243 50 240
sequel 5 422 5 418 50 595 50 572
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 81 50 136 50 128
blurhash 5 83 5 87 50 143 50 144
erubi 5 137 5 135 50 137 50 128
etanni 5 97 5 66 50 71 50 30
fannkuchredux 5 54 5 56 50 102 50 105
fluentd 5 56 5 57 50 29 50 29
graphql 5 372 5 456 50 578 50 906
graphql-native 5 57 5 84 50 22 50 64
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 55 50 95 50 91
nbody 5 247 5 297 50 703 50 698
nqueens 5 116 5 121 50 556 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 181 50 706 50 697
protoboeuf-encode 5 197 5 194 50 829 50 791
rack 5 437 5 435 50 705 50 677
ruby-json 5 82 5 79 50 50 50 45
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 157 50 159
tinygql 5 41 5 42 50 40 50 46
30k_ifelse 5 28 5 27 50 185 50 185
30k_methods 5 38 5 37 50 472 50 471
attr_accessor 5 157 5 193 50 1826 50 1905
cfunc_itself 5 348 5 350 50 1254 50 1258
fib 5 124 5 141 50 938 50 937
getivar 5 217 5 303 50 2311 50 2412
keyword_args 5 100 5 94 50 1239 50 1243
loops-times 5 23 5 25 50 62 50 54
object-new 5 268 5 347 50 299 50 592
respond_to 5 139 5 136 50 3890 50 3903
ruby-xor 5 236 5 248 50 1310 50 1274
send_bmethod 5 116 5 117 50 5539 50 5545
send_cfunc_block 5 106 5 106 50 360 50 346
send_rubyfunc_block 5 251 5 243 50 6924 50 6929
setivar 5 360 5 351 50 4926 50 4925
setivar_object 5 340 5 327 50 751 50 547
setivar_young 5 342 5 327 50 797 50 562
str_concat 5 391 5 401 50 1200 50 1018
throw 5 1086 5 1135 50 1416 50 1528

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) 1549701 1298347 205 2579 0 0% 0 0 73.983768
chunky-png (click) 315692 298642 74 1322 1 0% 0 0 37.435029
erubi-rails (click) 1962572 1689173 262 3639 22 0% 0 0 98.747847
hexapdf (click) 1525959 1383566 593 15700 44 0% 0 0 437.36364
liquid-c (click) 556874 463869 114 2228 5 0% 0 0 59.545073
liquid-compile (click) 479341 439340 146 2725 2 0% 0 0 80.769795
liquid-render (click) 661413 618077 131 2946 8 0% 0 0 80.20271
lobsters (click) 8452360 6953114 3098 62305 118 0% 0 0 2089.519695
mail (click) 863337 800345 342 7696 40 0% 0 0 213.509768
psych-load (click) 288690 250003 61 830 2 0% 0 0 24.43095
railsbench (click) 3351422 2961879 1605 19550 47 0% 0 0 547.786019
rubocop (click) 5759806 5030069 3001 56842 126 0% 6 0 1665.759399
ruby-lsp (click) 962742 825575 347 6793 44 0% 1 0 183.234208
sequel (click) 501851 372843 11 119 0 0% 0 0 4.013241
shipit (click) 7734487 6544952 3343 53423 181 0% 1 0 1811.016105
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.601639
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.639904
erubi (click) 234734 217109 5 125 0 0% 0 0 3.83411
etanni (click) 32930 35718 8 114 0 0% 0 0 3.610618
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.894514
fluentd (click) 490354 433569 7 115 0 0% 0 0 3.754662
graphql (click) 408799 327055 73 1920 19 0% 0 0 53.505409
graphql-native (click) 354213 311433 39 532 0 0% 0 0 13.652658
lee (click) 305246 291319 49 1070 0 0% 0 0 31.560586
matmul (click) 11125 4603 8 132 0 0% 0 0 4.206645
nbody (click) 13890 20235 6 238 0 0% 0 0 5.865853
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.2085
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.939328
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.683101
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.430544
rack (click) 279782 239348 35 580 0 0% 0 0 15.192095
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.654665
rubyboy (click) 703993 646292 154 6864 42 0% 0 0 166.811216
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.202629
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.151418
tinygql (click) 300749 271625 59 1031 5 0% 0 0 27.013979
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1920.120097
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 472.954932
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.14114
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.538139
fib (click) 2659 2995 3 30 0 0% 0 0 1.131625
getivar (click) 3812 6802 3 78 0 0% 0 0 1.971217
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.805903
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.8325
object-new (click) 2406 2818 2 36 0 0% 0 0 1.091897
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13168
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.701186
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.754638
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.298715
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.475322
setivar (click) 2783 3726 3 46 0 0% 0 0 1.297669
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.464656
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.766229
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.495808
throw (click) 5953 4624 5 53 0 0% 0 0 1.80507

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.