Ruby Benchmarks

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

YJIT metrics from the ruby-bench suite using Ruby 704677257e.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 93.6% faster than CRuby 3.5.0dev
  • 6.1% faster than YJIT 3.3.6
On railsbench it is
  • 106.3% faster than CRuby 3.5.0dev
  • 6.0% faster than YJIT 3.3.6
x86_64 runtime: 6 hours, 44 minutes
aarch64 runtime: 5 hours, 49 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 81 5 85 50 166 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 420 5 385 50 593 50 545
liquid-compile 5 411 5 472 50 551 50 691
liquid-render 5 173 5 170 50 416 50 376
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 185 50 251 50 232
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 213 50 220
ruby-lsp 5 140 5 145 50 243 50 241
sequel 5 423 5 416 50 602 50 575
shipit 5 10 5 10 50 10 50 10
binarytrees 5 84 5 78 50 142 50 128
blurhash 5 82 5 86 50 127 50 145
erubi 5 70 5 138 50 101 50 137
etanni 5 90 5 65 50 54 50 32
fannkuchredux 5 52 5 57 50 98 50 102
fluentd 5 62 5 61 50 23 50 23
graphql 5 348 5 457 50 443 50 923
graphql-native 5 53 5 81 50 13 50 59
lee 5 23 5 22 50 10 50 10
matmul 5 50 5 49 50 87 50 89
nbody 5 247 5 256 50 578 50 701
nqueens 5 120 5 127 50 74 50 552
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 179 50 621 50 664
protoboeuf-encode 5 178 5 195 50 325 50 778
rack 5 424 5 442 50 644 50 692
ruby-json 5 84 5 80 50 50 50 47
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 50 50 163 50 150
tinygql 5 40 5 42 50 42 50 47
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 38 5 37 50 474 50 475
attr_accessor 5 159 5 212 50 1726 50 1930
cfunc_itself 5 338 5 349 50 1137 50 1258
fib 5 127 5 140 50 912 50 939
getivar 5 212 5 285 50 2261 50 2395
keyword_args 5 103 5 104 50 1033 50 1243
loops-times 5 24 5 22 50 48 50 57
object-new 5 318 5 348 50 405 50 587
respond_to 5 133 5 137 50 3255 50 3906
ruby-xor 5 244 5 244 50 797 50 1264
setivar 5 361 5 377 50 3047 50 4953
setivar_object 5 357 5 356 50 683 50 555
setivar_young 5 367 5 356 50 697 50 582
str_concat 5 394 5 429 50 977 50 1143
throw 5 1260 5 1117 50 1735 50 1547

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 1349755 205 2579 0 0% 0 0 73.044744
chunky-png (click) 317160 258897 74 1322 1 0% 0 0 37.36069
erubi-rails (click) 1929220 1641813 262 3649 22 0% 0 0 98.871119
hexapdf (click) 1513168 1343296 593 15674 43 0% 0 0 438.100777
liquid-c (click) 541366 461663 114 2228 5 0% 0 0 60.06978
liquid-compile (click) 463062 412136 146 2698 2 0% 0 0 79.475498
liquid-render (click) 647345 511122 131 2946 8 0% 0 0 80.255701
lobsters (click) 8405715 7013814 3098 62178 118 0% 0 0 2082.910816
mail (click) 856976 783293 342 7697 40 0% 0 0 212.405575
psych-load (click) 281261 257349 61 830 2 0% 0 0 23.761463
railsbench (click) 3324552 2863522 1605 19553 47 0% 0 0 546.781426
rubocop (click) 6113995 5244192 3012 63582 133 0% 6 0 1818.445853
ruby-lsp (click) 955040 840148 347 6795 44 0% 1 0 182.610271
sequel (click) 494589 387974 11 119 0 0% 0 0 3.868372
shipit (click) 7576140 6337542 3263 51869 180 0% 0 0 1706.815305
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.68295
blurhash (click) 52295 51444 27 603 0 0% 0 0 17.639314
erubi (click) 247501 222214 5 125 0 0% 0 0 3.828045
etanni (click) 32930 35718 8 114 0 0% 0 0 3.585216
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 10.827647
fluentd (click) 465529 411260 7 115 0 0% 0 0 3.79436
graphql (click) 401183 374841 73 1920 19 0% 0 0 54.048155
graphql-native (click) 345911 308966 39 532 0 0% 0 0 13.770162
lee (click) 310638 287327 49 1070 0 0% 0 0 30.945508
matmul (click) 11125 4603 8 132 0 0% 0 0 4.26613
nbody (click) 13890 20235 6 238 0 0% 0 0 5.880048
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.102709
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.159688
protoboeuf (click) 170160 177773 12 2836 0 0% 0 0 72.293817
protoboeuf-encode (click) 243046 283791 14 1815 0 0% 0 0 44.73991
rack (click) 274304 215435 35 580 0 0% 0 0 14.822632
ruby-json (click) 19791 17761 8 204 0 0% 0 0 5.602353
rubyboy (click) 689052 555176 154 6864 42 0% 0 0 167.307352
rubykon (click) 146229 162118 137 2070 3 0% 0 0 56.164889
sudoku (click) 52157 66291 7 871 0 0% 0 0 23.145636
tinygql (click) 299900 254174 59 1031 5 0% 0 0 26.773527
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1926.89147
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 479.128022
attr_accessor (click) 4372 7952 3 78 0 0% 0 0 2.125146
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.516774
fib (click) 2659 2995 3 30 0 0% 0 0 1.118706
getivar (click) 3812 6802 3 78 0 0% 0 0 1.943439
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.81331
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.770039
object-new (click) 2406 2818 2 36 0 0% 0 0 1.070368
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.195308
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.745187
setivar (click) 2783 3726 3 46 0 0% 0 0 1.279078
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.465548
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.735016
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.502687
throw (click) 5953 4624 5 53 0 0% 0 0 1.804752

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.