Ruby Benchmarks

Details for Benchmarks at 2025-10-09 01:03:55 UTC

YJIT metrics from the ruby-bench suite using Ruby 77b62a8292.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.0% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
On railsbench it is
  • 97.9% faster than CRuby 3.5.0dev
  • the same speed as YJIT 3.4.7
x86_64 runtime: 6 hours, 44 minutes
aarch64 runtime: 5 hours, 50 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 82 5 83 50 192 50 216
chunky-png 5 32 5 32 50 33 50 27
erubi-rails 5 15 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 401 50 627 50 528
liquid-compile 5 420 5 458 50 545 50 714
liquid-render 5 172 5 170 50 436 50 380
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 181 50 254 50 228
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 139 5 141 50 218 50 217
ruby-lsp 5 138 5 146 50 246 50 243
sequel 5 422 5 414 50 597 50 571
shipit 5 10 5 10 50 10 50 10
binarytrees 5 82 5 79 50 136 50 127
blurhash 5 83 5 87 50 143 50 144
erubi 5 137 5 134 50 149 50 128
etanni 5 98 5 65 50 71 50 30
fannkuchredux 5 54 5 56 50 101 50 100
fluentd 5 56 5 58 50 29 50 28
graphql 5 371 5 441 50 535 50 923
graphql-native 5 58 5 82 50 21 50 62
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 54 50 94 50 90
nbody 5 247 5 293 50 704 50 698
nqueens 5 116 5 123 50 556 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 173 50 706 50 637
protoboeuf-encode 5 197 5 193 50 830 50 772
rack 5 437 5 435 50 708 50 680
ruby-json 5 84 5 80 50 51 50 46
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 157 50 157
tinygql 5 41 5 41 50 36 50 45
30k_ifelse 5 28 5 27 50 185 50 184
30k_methods 5 38 5 37 50 474 50 472
attr_accessor 5 157 5 198 50 1817 50 1914
cfunc_itself 5 343 5 345 50 1255 50 1257
fib 5 124 5 139 50 936 50 937
getivar 5 218 5 284 50 2316 50 2396
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 22 50 62 50 57
object-new 5 268 5 349 50 299 50 577
respond_to 5 134 5 137 50 3892 50 3908
ruby-xor 5 236 5 242 50 1310 50 1272
setivar 5 360 5 349 50 4923 50 4921
setivar_object 5 341 5 326 50 749 50 543
setivar_young 5 341 5 326 50 797 50 567
str_concat 5 389 5 402 50 908 50 1076
throw 5 1087 5 1085 50 1418 50 1536

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) 1538412 1341567 205 2579 0 0% 0 0 73.629948
chunky-png (click) 317075 283435 74 1322 1 0% 0 0 37.780994
erubi-rails (click) 1938109 1699158 261 3770 22 0% 0 0 103.237242
hexapdf (click) 1516235 1289396 594 15700 43 0% 0 0 443.745848
liquid-c (click) 541517 437550 114 2228 5 0% 0 0 59.586535
liquid-compile (click) 462855 428714 146 2691 2 0% 0 0 79.628462
liquid-render (click) 648370 619394 131 2946 8 0% 0 0 80.777381
lobsters (click) 8402093 7081527 3099 62167 120 0% 0 0 2086.232274
mail (click) 857508 825239 342 7696 40 0% 0 0 213.166041
psych-load (click) 276187 269668 61 830 2 0% 0 0 24.209645
railsbench (click) 3321647 2925150 1605 19553 47 0% 0 0 555.83446
rubocop (click) 6114760 5416829 3012 63570 133 0% 6 0 1820.01603
ruby-lsp (click) 956121 808447 346 6755 43 0% 1 0 181.693964
sequel (click) 486748 443072 11 119 0 0% 0 0 4.045505
shipit (click) 7563421 6293389 3261 51766 180 0% 0 0 1717.486869
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.624738
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.785011
erubi (click) 247416 213964 5 125 0 0% 0 0 3.825224
etanni (click) 32930 35718 8 114 0 0% 0 0 3.604222
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.877568
fluentd (click) 462406 424953 7 115 0 0% 0 0 3.814306
graphql (click) 402009 342773 73 1920 19 0% 0 0 53.641271
graphql-native (click) 347412 261553 39 532 0 0% 0 0 14.061757
lee (click) 311305 296540 49 1070 0 0% 0 0 31.007919
matmul (click) 11125 4603 8 132 0 0% 0 0 4.202396
nbody (click) 13890 20235 6 238 0 0% 0 0 5.875919
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.261232
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.447743
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.650474
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.888557
rack (click) 274979 216517 35 580 0 0% 0 0 15.213615
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.654259
rubyboy (click) 691395 647919 154 6860 42 0% 0 0 168.190995
rubykon (click) 146441 162602 137 2076 3 0% 0 0 56.560032
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.412685
tinygql (click) 300433 270902 59 1031 5 0% 0 0 27.254123
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1934.623462
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 477.692157
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.145909
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.539629
fib (click) 2659 2995 3 30 0 0% 0 0 1.135257
getivar (click) 3812 6802 3 78 0 0% 0 0 1.930098
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.821905
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.792313
object-new (click) 2406 2818 2 36 0 0% 0 0 1.018823
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.147187
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.738941
setivar (click) 2783 3726 3 46 0 0% 0 0 1.297202
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.476003
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.760356
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.523288
throw (click) 5953 4624 5 53 0 0% 0 0 1.791033

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.