Ruby Benchmarks

Details for Benchmarks at 2025-12-21 00:45:20 UTC

YJIT metrics from the ruby-bench suite using Ruby 483ef3a0d2.

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 96.4% faster than CRuby 4.0.0dev
  • 4.9% faster than YJIT 3.4.7
On railsbench it is
  • 116.6% faster than CRuby 4.0.0dev
  • 10.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 9 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 4.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 90 5 98 50 191 50 240
chunky-png 5 31 5 33 50 32 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 425 50 628 50 638
liquid-compile 5 419 5 464 50 580 50 716
liquid-render 5 171 5 171 50 436 50 425
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 191 50 253 50 256
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 158 50 246 50 248
ruby-lsp 5 141 5 146 50 246 50 243
sequel 5 429 5 432 50 598 50 605
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 163 5 166 50 184 50 192
addressable-join 5 73 5 74 50 66 50 68
addressable-merge 5 159 5 151 50 223 50 220
addressable-new 5 354 5 343 50 521 50 521
addressable-normalize 5 53 5 53 50 59 50 56
addressable-parse 5 103 5 103 50 104 50 107
addressable-setters 5 184 5 178 50 231 50 226
addressable-to-s 5 163 5 167 50 184 50 191
binarytrees 5 82 5 85 50 136 50 137
blurhash 5 83 5 87 50 143 50 145
erubi 5 139 5 142 50 133 50 137
etanni 5 98 5 69 50 71 50 33
fannkuchredux 5 54 5 57 50 102 50 104
fluentd 5 56 5 62 50 19 50 30
graphql 5 369 5 466 50 570 50 931
graphql-native 5 57 5 87 50 23 50 66
knucleotide 5 162 5 157 50 118 50 112
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 50 50 94 50 95
nbody 5 243 5 258 50 676 50 706
nqueens 5 116 5 121 50 556 50 588
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 182 50 706 50 703
protoboeuf-encode 5 198 5 197 50 828 50 777
rack 5 438 5 448 50 709 50 695
ruby-json 5 82 5 96 50 50 50 69
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 163
tinygql 5 39 5 44 50 36 50 47
30k_ifelse 5 28 5 28 50 185 50 181
30k_methods 5 38 5 40 50 456 50 457
attr_accessor 5 157 5 200 50 1834 50 1923
cfunc_itself 5 348 5 353 50 1254 50 1259
fib 5 124 5 140 50 940 50 940
getivar 5 216 5 321 50 2314 50 2429
getivar-module 5 104 5 139 50 90 50 268
keyword_args 5 100 5 105 50 1239 50 1242
loops-times 5 23 5 26 50 64 50 59
object-new 5 252 5 362 50 299 50 672
respond_to 5 139 5 138 50 3888 50 3902
ruby-xor 5 237 5 245 50 1315 50 1290
send_bmethod 5 116 5 119 50 5538 50 4527
send_cfunc_block 5 106 5 106 50 353 50 343
send_rubyfunc_block 5 251 5 247 50 6924 50 6928
setivar 5 360 5 469 50 4924 50 5035
setivar_object 5 341 5 334 50 751 50 617
setivar_young 5 341 5 335 50 797 50 637
str_concat 5 391 5 428 50 1200 50 1124
structaref 5 156 5 197 50 1811 50 1894
structaset 5 204 5 261 50 396 50 516
throw 5 1088 5 1287 50 1416 50 1558

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) 1545535 1331757 203 2662 0 0% 0 0 75.539839
chunky-png (click) 314051 286144 79 1381 1 0% 0 0 39.539056
erubi-rails (click) 1374349 1201687 268 3726 22 0% 0 0 100.36638
hexapdf (click) 1523945 1331283 593 15675 44 0% 0 0 442.0267
liquid-c (click) 557137 472254 114 2228 5 0% 0 0 59.902667
liquid-compile (click) 477372 421275 146 2684 2 0% 0 0 78.441473
liquid-render (click) 663282 587300 131 2946 8 0% 0 0 79.445894
lobsters (click) 8681205 7246978 3124 64160 117 0% 0 0 2220.222579
mail (click) 866003 860701 345 7721 40 0% 0 0 214.593767
psych-load (click) 288196 233002 61 828 2 0% 0 0 23.878112
railsbench (click) 3347849 2989507 1591 19769 97 0% 0 0 551.546952
rubocop (click) 5759416 5012769 3002 56848 126 0% 6 0 1662.986549
ruby-lsp (click) 959695 855991 342 6692 43 0% 1 0 180.464547
sequel (click) 502354 414364 11 119 0 0% 0 0 4.094041
shipit (click) 7862767 6674303 3421 55439 187 0% 1 0 1820.026495
addressable-equality (click) 318843 237848 44 1381 1 0% 0 0 34.113285
addressable-getters (click) 281685 208178 26 905 0 0% 0 0 21.936276
addressable-join (click) 288387 267886 24 1005 0 0% 0 0 25.218904
addressable-merge (click) 283350 239869 27 896 0 0% 0 0 22.154448
addressable-new (click) 249807 218863 21 565 0 0% 0 0 14.246217
addressable-normalize (click) 314251 241077 43 1328 1 0% 0 0 32.312416
addressable-parse (click) 280662 230693 26 880 0 0% 0 0 21.682847
addressable-setters (click) 258376 223294 20 582 0 0% 0 0 14.554059
addressable-to-s (click) 278759 212320 26 849 0 0% 0 0 20.543504
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.842036
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.837186
erubi (click) 248350 248450 6 134 0 0% 0 0 3.976184
etanni (click) 32832 35642 8 113 0 0% 0 0 3.508466
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.833953
fluentd (click) 476891 334958 7 115 0 0% 0 0 3.811318
graphql (click) 409696 328196 73 1921 19 0% 0 0 54.372552
graphql-native (click) 353635 302525 39 532 0 0% 0 0 14.138095
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.472417
lee (click) 318220 296773 49 1097 0 0% 0 0 31.620525
matmul (click) 11103 4709 8 136 0 0% 0 0 4.260252
nbody (click) 14448 21176 6 251 0 0% 0 0 6.164125
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.280994
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 111.206227
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.373221
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.423394
rack (click) 281978 259881 35 626 0 0% 0 0 16.510328
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.629245
rubyboy (click) 698062 666338 154 6864 42 0% 0 0 167.796604
rubykon (click) 146869 163015 137 2080 3 0% 0 0 56.750758
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.066889
tinygql (click) 300061 262818 59 1031 5 0% 0 0 27.539495
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1924.412812
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.422312
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.125129
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.520398
fib (click) 2659 2995 3 30 0 0% 0 0 1.143194
getivar (click) 3789 6778 3 79 0 0% 0 0 1.963686
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.335465
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.846891
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.980212
object-new (click) 2406 2818 2 36 0 0% 0 0 1.123909
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.107955
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.84575
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.862994
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.16788
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.470213
setivar (click) 2783 3726 3 46 0 0% 0 0 1.313095
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.409533
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.748903
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.457098
structaref (click) 4407 9095 3 88 0 0% 0 0 2.376162
structaset (click) 3926 5614 3 70 0 0% 0 0 1.770122
throw (click) 5953 4624 5 53 0 0% 0 0 1.818943

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.