Ruby Benchmarks

Details for Benchmarks at 2026-01-17 00:41:56 UTC

YJIT metrics from the ruby-bench suite using Ruby 8a586af33b.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.1% faster than CRuby 4.1.0dev
  • 5.3% faster than YJIT 3.4.7
On railsbench it is
  • 116.1% faster than CRuby 4.1.0dev
  • 8.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 18 minutes
aarch64 runtime: 7 hours, 11 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.1.0dev warmups CRuby 4.1.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.1.0dev warmups YJIT 4.1.0dev iters
activerecord 5 90 5 96 50 200 50 226
chunky-png 5 31 5 32 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 424 5 422 50 624 50 622
liquid-compile 5 414 5 472 50 584 50 712
liquid-render 5 173 5 173 50 436 50 432
mail 5 195 5 190 50 253 50 261
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 236 50 253
ruby-lsp 5 154 5 163 50 225 50 232
sequel 5 421 5 422 50 601 50 583
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 164 5 167 50 183 50 188
addressable-join 5 73 5 74 50 65 50 68
addressable-merge 5 161 5 157 50 221 50 217
addressable-new 5 353 5 343 50 525 50 516
addressable-normalize 5 54 5 51 50 60 50 56
addressable-parse 5 104 5 102 50 104 50 105
addressable-setters 5 185 5 179 50 230 50 227
addressable-to-s 5 163 5 164 50 182 50 188
binarytrees 5 82 5 82 50 136 50 129
blurhash 5 83 5 87 50 143 50 144
erubi 5 137 5 148 50 135 50 149
etanni 5 98 5 70 50 71 50 36
fannkuchredux 5 55 5 57 50 101 50 103
fluentd 5 59 5 62 50 20 50 24
graphql 5 370 5 459 50 535 50 928
graphql-native 5 59 5 84 50 22 50 68
knucleotide 5 163 5 157 50 117 50 111
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 55 50 94 50 97
nbody 5 246 5 270 50 676 50 668
nqueens 5 116 5 128 50 556 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 171 5 180 50 706 50 731
protoboeuf-encode 5 198 5 202 50 833 50 758
rack 5 439 5 449 50 709 50 688
ruby-json 5 82 5 96 50 51 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 162
tinygql 5 41 5 43 50 36 50 50
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 455 50 457
attr_accessor 5 157 5 213 50 1834 50 1943
cfunc_itself 5 347 5 349 50 1255 50 1259
fib 5 124 5 145 50 939 50 939
getivar 5 214 5 330 50 2313 50 2433
getivar-module 5 104 5 142 50 89 50 269
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 56
object-new 5 268 5 364 50 298 50 680
respond_to 5 139 5 135 50 3891 50 3900
ruby-xor 5 237 5 240 50 1314 50 1292
send_bmethod 5 116 5 122 50 5538 50 4527
send_cfunc_block 5 107 5 107 50 353 50 345
send_rubyfunc_block 5 250 5 246 50 6925 50 6926
setivar 5 360 5 479 50 4926 50 5046
setivar_object 5 341 5 302 50 749 50 528
setivar_young 5 347 5 306 50 796 50 555
str_concat 5 392 5 448 50 1199 50 1202
structaref 5 156 5 208 50 1813 50 1905
structaset 5 203 5 272 50 395 50 502
throw 5 1088 5 1241 50 1416 50 1560

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) 1543781 1362650 203 2638 0 0% 0 0 75.804752
chunky-png (click) 319096 277413 79 1374 1 0% 0 0 39.012992
erubi-rails (click) 1366557 1166113 268 3686 22 0% 0 0 98.612344
hexapdf (click) 1519508 1317666 593 15664 44 0% 0 0 438.36344
liquid-c (click) 558094 522337 114 2231 5 0% 0 0 59.214308
liquid-compile (click) 475117 401819 146 2672 2 0% 0 0 76.298429
liquid-render (click) 664496 580422 131 2950 8 0% 0 0 79.727908
mail (click) 868274 828575 345 7740 40 0% 0 0 215.376649
psych-load (click) 287751 281596 61 829 2 0% 0 0 23.975601
railsbench (click) 3342599 2893204 1591 19699 97 0% 0 0 548.960125
rubocop (click) 5758297 5060113 3002 56868 125 0% 6 0 1662.913127
ruby-lsp (click) 1035578 887776 407 7363 46 0% 1 0 204.466896
sequel (click) 502331 389583 11 119 0 0% 0 0 4.092454
shipit (click) 7246384 6162122 3379 53403 170 0% 1 0 1783.488235
addressable-equality (click) 316912 268629 44 1379 1 0% 0 0 34.170114
addressable-getters (click) 275766 184887 26 863 0 0% 0 0 20.991973
addressable-join (click) 288946 275231 24 1005 0 0% 0 0 25.128037
addressable-merge (click) 280994 228572 27 898 0 0% 0 0 22.237196
addressable-new (click) 256270 219010 21 563 0 0% 0 0 14.274645
addressable-normalize (click) 313970 288596 43 1326 1 0% 0 0 32.758732
addressable-parse (click) 278301 235775 26 882 0 0% 0 0 21.873783
addressable-setters (click) 257767 197803 20 582 0 0% 0 0 14.55596
addressable-to-s (click) 275036 224456 26 849 0 0% 0 0 20.619786
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.819832
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.072507
erubi (click) 247432 206197 6 132 0 0% 0 0 3.854987
etanni (click) 32382 26816 8 111 0 0% 0 0 3.461672
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.007787
fluentd (click) 483073 424060 7 115 0 0% 0 0 3.760276
graphql (click) 409555 368254 73 1912 19 0% 0 0 53.73383
graphql-native (click) 353075 309191 39 532 0 0% 0 0 14.046902
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.85769
lee (click) 315633 268728 49 1091 0 0% 0 0 31.323878
matmul (click) 11103 4709 8 136 0 0% 0 0 4.279176
nbody (click) 14448 21176 6 251 0 0% 0 0 6.121971
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.348442
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.063383
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.933254
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.338327
rack (click) 280117 231424 35 580 0 0% 0 0 15.17442
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.707369
rubyboy (click) 704456 614407 154 6869 42 0% 0 0 167.832469
rubykon (click) 149025 157510 137 2107 3 0% 0 0 56.910689
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.21086
tinygql (click) 300726 271552 59 1031 5 0% 0 0 26.990498
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1945.438082
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 494.228841
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.086035
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.527357
fib (click) 2659 2995 3 30 0 0% 0 0 1.124044
getivar (click) 3789 6778 3 79 0 0% 0 0 1.954057
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.333771
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.835784
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.911052
object-new (click) 2406 2818 2 36 0 0% 0 0 1.03032
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.140464
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.935026
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.836896
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.156158
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.444929
setivar (click) 2783 3726 3 46 0 0% 0 0 1.252988
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.434067
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.742414
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.436209
structaref (click) 4407 9095 3 88 0 0% 0 0 2.361555
structaset (click) 4113 5834 3 70 0 0% 0 0 1.795718
throw (click) 5953 4624 5 53 0 0% 0 0 1.895291

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.