Ruby Benchmarks

Details for Benchmarks at 2025-09-28 01:04:18 UTC

YJIT metrics from the ruby-bench suite using Ruby 598a8f8914.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.7% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
On railsbench it is
  • 106.2% faster than CRuby 3.5.0dev
  • 9.4% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 46 minutes
aarch64 runtime: 5 hours, 51 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 84 5 85 50 184 50 222
chunky-png 5 31 5 32 50 14 50 28
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 408 5 397 50 571 50 529
liquid-compile 5 411 5 461 50 543 50 684
liquid-render 5 170 5 163 50 415 50 376
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 170 50 240 50 208
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 139 5 140 50 205 50 221
ruby-lsp 5 145 5 146 50 224 50 244
sequel 5 425 5 419 50 595 50 581
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 81 50 141 50 128
blurhash 5 82 5 86 50 127 50 145
erubi 5 125 5 139 50 89 50 135
etanni 5 90 5 68 50 53 50 33
fannkuchredux 5 52 5 57 50 98 50 101
fluentd 5 62 5 59 50 23 50 26
graphql 5 336 5 444 50 462 50 925
graphql-native 5 51 5 83 50 13 50 63
lee 5 22 5 22 50 10 50 10
matmul 5 50 5 50 50 87 50 91
nbody 5 248 5 245 50 578 50 702
nqueens 5 120 5 127 50 74 50 562
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 175 50 621 50 654
protoboeuf-encode 5 177 5 206 50 325 50 781
rack 5 426 5 443 50 641 50 705
ruby-json 5 84 5 80 50 50 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 51 50 162 50 151
tinygql 5 41 5 42 50 40 50 47
30k_ifelse 5 28 5 27 50 215 50 185
30k_methods 5 39 5 37 50 479 50 474
attr_accessor 5 159 5 204 50 1728 50 1920
cfunc_itself 5 338 5 363 50 1137 50 1258
fib 5 127 5 135 50 912 50 935
getivar 5 211 5 350 50 2255 50 2441
keyword_args 5 103 5 100 50 1033 50 1242
loops-times 5 24 5 24 50 48 50 57
object-new 5 318 5 344 50 404 50 585
respond_to 5 132 5 133 50 3253 50 3896
ruby-xor 5 244 5 251 50 795 50 1273
setivar 5 361 5 395 50 3090 50 4965
setivar_object 5 358 5 366 50 684 50 587
setivar_young 5 367 5 367 50 699 50 616
str_concat 5 390 5 437 50 980 50 1078
throw 5 1258 5 1185 50 1743 50 1610

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) 1536254 1339775 205 2577 0 0% 0 0 78.337532
chunky-png (click) 305866 295965 74 1322 1 0% 0 0 38.213589
erubi-rails (click) 1932454 1691488 261 3675 22 0% 0 0 100.071383
hexapdf (click) 1513593 1343553 593 15678 43 0% 0 0 439.40324
liquid-c (click) 541073 428559 114 2224 5 0% 0 0 60.554151
liquid-compile (click) 463755 412905 146 2706 2 0% 0 0 81.074801
liquid-render (click) 647345 519314 131 2946 8 0% 0 0 80.586458
lobsters (click) 8556720 7215209 3119 63706 118 0% 0 0 2101.231095
mail (click) 856833 840521 342 7696 40 0% 0 0 212.544899
psych-load (click) 282087 241645 61 830 2 0% 0 0 24.551739
railsbench (click) 3324609 2829422 1605 19561 47 0% 0 0 590.56852
rubocop (click) 6123175 5344771 3014 63663 156 0% 6 0 1826.395897
ruby-lsp (click) 961505 912362 347 6802 44 0% 1 0 183.972362
sequel (click) 494880 429253 11 119 0 0% 0 0 3.779497
shipit (click) 7945413 6683327 3399 55684 188 0% 1 0 1827.398579
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.648469
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.725383
erubi (click) 247501 197658 5 125 0 0% 0 0 3.814585
etanni (click) 32930 35718 8 114 0 0% 0 0 3.640576
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.837333
fluentd (click) 467641 437650 7 115 0 0% 0 0 3.797674
graphql (click) 402307 343069 73 1920 19 0% 0 0 54.118887
graphql-native (click) 346737 285070 39 532 0 0% 0 0 13.850841
lee (click) 310593 295490 49 1070 0 0% 0 0 31.360845
matmul (click) 11125 4603 8 132 0 0% 0 0 4.218399
nbody (click) 13890 20235 6 238 0 0% 0 0 5.833908
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.194999
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.885117
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.902812
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.660611
rack (click) 274304 215435 35 580 0 0% 0 0 15.252975
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.674326
rubyboy (click) 689278 612617 154 6860 42 0% 0 0 167.309272
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.675223
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.234678
tinygql (click) 299859 253996 59 1025 5 0% 0 0 27.246042
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1929.188087
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 480.282161
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.122813
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.523252
fib (click) 2659 2995 3 30 0 0% 0 0 1.09967
getivar (click) 3812 6802 3 78 0 0% 0 0 1.942116
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.793061
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.810395
object-new (click) 2406 2818 2 36 0 0% 0 0 1.056667
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.108338
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.720701
setivar (click) 2783 3726 3 46 0 0% 0 0 1.243579
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.458393
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.752506
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.493686
throw (click) 5953 4624 5 53 0 0% 0 0 1.842229

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.