Ruby Benchmarks

Details for Benchmarks at 2025-12-19 00:42:14 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 94.9% faster than CRuby 4.0.0dev
  • 3.3% faster than YJIT 3.4.7
On railsbench it is
  • 113.2% faster than CRuby 4.0.0dev
  • 10.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 16 minutes
aarch64 runtime: 7 hours, 10 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 97 50 204 50 220
chunky-png 5 31 5 33 50 32 50 30
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 427 50 630 50 636
liquid-compile 5 416 5 472 50 584 50 687
liquid-render 5 172 5 172 50 433 50 430
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 197 50 253 50 271
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 157 50 248 50 249
ruby-lsp 5 138 5 149 50 254 50 244
sequel 5 422 5 424 50 605 50 600
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 163 5 170 50 184 50 192
addressable-join 5 73 5 78 50 65 50 68
addressable-merge 5 160 5 158 50 222 50 220
addressable-new 5 351 5 354 50 522 50 518
addressable-normalize 5 53 5 55 50 59 50 57
addressable-parse 5 103 5 103 50 103 50 108
addressable-setters 5 183 5 182 50 232 50 232
addressable-to-s 5 163 5 168 50 182 50 189
binarytrees 5 82 5 85 50 136 50 136
blurhash 5 83 5 88 50 143 50 144
erubi 5 134 5 142 50 120 50 135
etanni 5 98 5 69 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 104
fluentd 5 62 5 60 50 20 50 24
graphql 5 373 5 464 50 534 50 930
graphql-native 5 59 5 87 50 22 50 67
knucleotide 5 162 5 160 50 117 50 113
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 246 5 255 50 676 50 680
nqueens 5 116 5 128 50 557 50 588
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 692
protoboeuf-encode 5 197 5 194 50 836 50 776
rack 5 438 5 453 50 707 50 703
ruby-json 5 82 5 96 50 46 50 68
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 156 50 162
tinygql 5 42 5 44 50 35 50 48
30k_ifelse 5 28 5 28 50 184 50 182
30k_methods 5 38 5 40 50 456 50 451
attr_accessor 5 158 5 195 50 1834 50 1916
cfunc_itself 5 347 5 352 50 1255 50 1259
fib 5 123 5 143 50 939 50 940
getivar 5 217 5 299 50 2313 50 2407
getivar-module 5 104 5 135 50 90 50 268
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 45
object-new 5 268 5 362 50 297 50 677
respond_to 5 139 5 142 50 3886 50 3905
ruby-xor 5 236 5 246 50 1314 50 1290
send_bmethod 5 117 5 122 50 5538 50 4527
send_cfunc_block 5 106 5 107 50 353 50 343
send_rubyfunc_block 5 250 5 252 50 6922 50 6918
setivar 5 360 5 478 50 4928 50 5043
setivar_object 5 341 5 338 50 752 50 619
setivar_young 5 342 5 338 50 800 50 638
str_concat 5 391 5 430 50 1198 50 1130
structaref 5 156 5 184 50 1811 50 1871
structaset 5 201 5 264 50 397 50 519
throw 5 1090 5 1279 50 1414 50 1562

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) 1543597 1329751 203 2647 0 0% 0 0 75.22297
chunky-png (click) 320650 295858 79 1373 1 0% 0 0 38.992515
erubi-rails (click) 1366659 1242075 268 3624 22 0% 0 0 96.606389
hexapdf (click) 1523159 1354965 593 15658 44 0% 0 0 438.075487
liquid-c (click) 557116 414763 114 2228 5 0% 0 0 59.717845
liquid-compile (click) 478844 422715 146 2686 2 0% 0 0 78.576533
liquid-render (click) 660018 559979 131 2946 8 0% 0 0 79.736877
lobsters (click) 8674335 7292129 3126 64037 117 0% 0 0 2108.577813
mail (click) 861584 805704 345 7721 40 0% 0 0 213.65626
psych-load (click) 288196 233002 61 828 2 0% 0 0 23.824045
railsbench (click) 3347696 2942326 1591 19747 97 0% 0 0 551.414774
rubocop (click) 5760786 4956226 3002 56851 127 0% 6 0 1661.047584
ruby-lsp (click) 959795 864146 342 6701 44 0% 1 0 180.197592
sequel (click) 502390 455504 11 119 0 0% 0 0 4.074428
shipit (click) 7526625 6205541 3281 51835 182 0% 0 0 1701.919795
addressable-equality (click) 318221 278321 44 1381 1 0% 0 0 34.133234
addressable-getters (click) 273531 239451 26 863 0 0% 0 0 21.020692
addressable-join (click) 283807 237622 24 941 0 0% 0 0 23.442244
addressable-merge (click) 284556 240801 27 896 0 0% 0 0 22.119799
addressable-new (click) 258443 221328 21 565 0 0% 0 0 14.174728
addressable-normalize (click) 317176 244154 43 1372 1 0% 0 0 33.269403
addressable-parse (click) 283305 241310 26 880 0 0% 0 0 21.537385
addressable-setters (click) 261180 225910 20 584 0 0% 0 0 14.688848
addressable-to-s (click) 278759 212320 26 849 0 0% 0 0 20.501968
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.843744
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.805515
erubi (click) 248521 199138 6 134 0 0% 0 0 3.90634
etanni (click) 33287 36246 8 113 0 0% 0 0 3.504466
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.839731
fluentd (click) 484854 384612 7 115 0 0% 0 0 3.727186
graphql (click) 406769 355710 73 1921 19 0% 0 0 53.72282
graphql-native (click) 353640 302525 39 532 0 0% 0 0 14.146725
knucleotide (click) 9997 11103 7 113 0 0% 0 0 6.460941
lee (click) 318220 296773 49 1097 0 0% 0 0 31.620744
matmul (click) 11103 4709 8 136 0 0% 0 0 4.23737
nbody (click) 14448 21176 6 251 0 0% 0 0 6.140973
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.232622
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.904317
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.047185
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.098943
rack (click) 275069 258328 35 580 0 0% 0 0 15.206924
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.634444
rubyboy (click) 699825 602097 154 6864 42 0% 0 0 168.088943
rubykon (click) 146869 163015 137 2080 3 0% 0 0 56.628145
sudoku (click) 51704 65882 7 870 0 0% 0 0 22.988492
tinygql (click) 286778 264216 59 1025 5 0% 0 0 27.219342
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1926.48695
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 489.421048
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.087279
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.551737
fib (click) 2659 2995 3 30 0 0% 0 0 1.159406
getivar (click) 3789 6778 3 79 0 0% 0 0 1.933593
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.316716
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.820715
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.906194
object-new (click) 2406 2818 2 36 0 0% 0 0 1.031603
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.137325
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.797785
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.84467
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.181775
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.466942
setivar (click) 2783 3726 3 46 0 0% 0 0 1.275399
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.385314
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.735382
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.438329
structaref (click) 4407 9095 3 88 0 0% 0 0 2.363445
structaset (click) 3926 5614 3 70 0 0% 0 0 1.770398
throw (click) 5953 4624 5 53 0 0% 0 0 1.840255

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.