Ruby Benchmarks

Details for Benchmarks at 2026-03-01 00:58:27 UTC

YJIT metrics from the ruby-bench suite using Ruby 19b636d3ec.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.6% faster than CRuby 4.1.0dev
  • 8.4% faster than YJIT 3.4.7
On railsbench it is
  • 113.3% faster than CRuby 4.1.0dev
  • 12.1% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 16 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 91 5 99 50 200 50 242
chunky-png 5 31 5 32 50 33 50 28
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 436 50 622 50 666
liquid-compile 5 416 5 478 50 583 50 722
liquid-render 5 171 5 173 50 433 50 448
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 196 50 250 50 277
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 160 50 247 50 254
ruby-lsp 5 159 5 164 50 216 50 234
sequel 5 428 5 444 50 605 50 621
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 163 5 174 50 184 50 210
addressable-join 5 73 5 81 50 65 50 76
addressable-merge 5 159 5 163 50 222 50 233
addressable-new 5 353 5 364 50 524 50 540
addressable-normalize 5 53 5 57 50 59 50 64
addressable-parse 5 103 5 108 50 103 50 117
addressable-setters 5 184 5 189 50 232 50 242
addressable-to-s 5 163 5 174 50 183 50 203
binarytrees 5 81 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 138 5 146 50 131 50 149
etanni 5 98 5 72 50 71 50 38
fannkuchredux 5 54 5 54 50 102 50 104
fluentd 5 56 5 64 50 23 50 27
graphql 5 373 5 469 50 572 50 915
graphql-native 5 58 5 89 50 23 50 70
knucleotide 5 164 5 161 50 118 50 115
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 49 50 94 50 96
nbody 5 247 5 274 50 676 50 700
nqueens 5 116 5 122 50 556 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 181 50 707 50 756
protoboeuf-encode 5 197 5 201 50 832 50 813
rack 5 443 5 466 50 713 50 733
ruby-json 5 81 5 103 50 46 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 157 50 167
tinygql 5 42 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 40 50 458 50 454
attr_accessor 5 157 5 198 50 1835 50 1921
cfunc_itself 5 348 5 349 50 1255 50 1259
fib 5 124 5 142 50 939 50 939
getivar 5 216 5 295 50 2315 50 2403
getivar-module 5 104 5 124 50 90 50 260
keyword_args 5 100 5 100 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 62
object-new 5 268 5 413 50 296 50 920
respond_to 5 139 5 138 50 3889 50 3902
ruby-xor 5 236 5 223 50 1314 50 1297
send_bmethod 5 116 5 123 50 5539 50 4527
send_cfunc_block 5 105 5 106 50 353 50 370
send_rubyfunc_block 5 251 5 249 50 6926 50 6923
setivar 5 359 5 436 50 4923 50 5011
setivar_object 5 341 5 302 50 751 50 627
setivar_young 5 341 5 303 50 799 50 648
str_concat 5 391 5 459 50 1204 50 1174
structaref 5 156 5 190 50 1811 50 1884
structaset 5 201 5 236 50 397 50 494
throw 5 1088 5 1401 50 1418 50 1811

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) 1553305 1334020 203 2654 0 0% 0 0 75.731835
chunky-png (click) 319142 276893 79 1376 1 0% 0 0 38.976265
erubi-rails (click) 1374213 1203783 268 3648 22 0% 0 0 97.201352
hexapdf (click) 1526330 1256560 593 15715 44 0% 0 0 434.52835
liquid-c (click) 546461 482648 114 2236 5 0% 0 0 59.070252
liquid-compile (click) 481102 431558 146 2734 2 0% 0 0 79.662502
liquid-render (click) 663821 609993 131 2959 8 0% 0 0 79.01163
lobsters (click) 8702656 7322365 3125 64247 120 0% 0 0 2103.731163
mail (click) 871785 814413 345 7728 40 0% 0 0 213.284455
psych-load (click) 288632 257329 61 831 2 0% 0 0 23.741283
railsbench (click) 3359394 2761819 1592 19778 97 0% 0 0 550.310446
rubocop (click) 5782702 5072134 3002 57110 125 0% 6 0 1659.706568
ruby-lsp (click) 1042525 904592 408 7446 46 0% 1 0 204.104558
sequel (click) 503021 422080 11 119 0 0% 0 0 3.913192
shipit (click) 7505260 6378409 3369 53908 176 0% 1 0 1778.331133
addressable-equality (click) 304781 278813 44 1380 1 0% 0 0 34.474846
addressable-getters (click) 277623 211576 26 863 0 0% 0 0 20.842753
addressable-join (click) 282997 228261 24 941 0 0% 0 0 23.475303
addressable-merge (click) 282378 262350 27 896 0 0% 0 0 22.044821
addressable-new (click) 258020 203962 21 565 0 0% 0 0 14.284002
addressable-normalize (click) 311930 279250 43 1352 1 0% 0 0 33.232732
addressable-parse (click) 279244 236663 26 894 0 0% 0 0 22.146447
addressable-setters (click) 258054 206032 20 582 0 0% 0 0 14.56404
addressable-to-s (click) 275043 224265 26 849 0 0% 0 0 20.424361
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.845486
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.029572
erubi (click) 248343 230801 6 134 0 0% 0 0 3.854124
etanni (click) 32900 34696 8 114 0 0% 0 0 3.44077
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.005424
fluentd (click) 487528 444096 7 116 0 0% 0 0 3.702906
graphql (click) 411743 343505 73 1909 19 0% 0 0 52.723823
graphql-native (click) 354875 316907 39 532 0 0% 0 0 14.352219
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.808041
lee (click) 317972 245222 49 1099 0 0% 0 0 30.932919
matmul (click) 11103 4709 8 136 0 0% 0 0 4.213562
nbody (click) 14448 21176 6 251 0 0% 0 0 6.154221
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.411033
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 107.909445
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.359242
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.964782
rack (click) 286786 288806 35 633 0 0% 0 0 16.564622
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.678931
rubyboy (click) 704416 588645 154 6873 42 0% 0 0 167.890972
rubykon (click) 148683 164130 138 2104 4 0% 0 0 56.618977
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.148887
tinygql (click) 288503 257223 59 1031 5 0% 0 0 27.217785
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1942.808054
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 488.421375
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.073275
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.490654
fib (click) 2659 2995 3 30 0 0% 0 0 1.147085
getivar (click) 3789 6778 3 79 0 0% 0 0 1.937807
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.312058
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.833506
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.923635
object-new (click) 2406 2818 2 36 0 0% 0 0 1.092818
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.124519
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.82431
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.796558
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.762487
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.458015
setivar (click) 2783 3726 3 46 0 0% 0 0 1.277042
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.406618
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.725912
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.476858
structaref (click) 4407 9095 3 88 0 0% 0 0 2.324989
structaset (click) 4113 5834 3 70 0 0% 0 0 1.788284
throw (click) 5953 4624 5 53 0 0% 0 0 1.769107

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.