Ruby Benchmarks

Details for Benchmarks at 2026-05-10 01:16:50 UTC

YJIT metrics from the ruby-bench suite using Ruby 276f0d9b3e.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.6% faster than CRuby 4.1.0dev
  • 8.3% faster than YJIT 3.4.7
On railsbench it is
  • 116.1% faster than CRuby 4.1.0dev
  • 14.8% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 60 minutes
aarch64 runtime: 7 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.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 92 5 95 50 199 50 225
chunky-png 5 32 5 31 50 33 50 26
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 439 50 613 50 661
liquid-compile 5 417 5 481 50 550 50 767
liquid-render 5 169 5 172 50 431 50 460
lobsters 5 20 5 21 50 10 50 10
mail 5 192 5 200 50 255 50 285
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 156 50 248 50 254
ruby-lsp 5 157 5 163 50 223 50 234
sequel 5 428 5 447 50 589 50 633
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 27 50 12 50 12
addressable-getters 5 163 5 164 50 183 50 200
addressable-join 5 75 5 78 50 66 50 72
addressable-merge 5 160 5 150 50 223 50 224
addressable-new 5 352 5 336 50 520 50 522
addressable-normalize 5 53 5 54 50 60 50 60
addressable-parse 5 103 5 102 50 104 50 111
addressable-setters 5 184 5 173 50 233 50 235
addressable-to-s 5 164 5 165 50 182 50 198
binarytrees 5 82 5 87 50 136 50 167
blurhash 5 84 5 85 50 145 50 145
erubi 5 130 5 151 50 142 50 157
etanni 5 100 5 80 50 72 50 48
fannkuchredux 5 55 5 57 50 100 50 104
fluentd 5 56 5 59 50 20 50 30
gcbench 5 10 5 10 50 10 50 16
graphql 5 370 5 443 50 564 50 953
graphql-native 5 58 5 89 50 21 50 70
knucleotide 5 163 5 144 50 117 50 98
lee 5 22 5 31 50 10 50 17
matmul 5 53 5 56 50 88 50 91
nbody 5 250 5 279 50 663 50 665
nqueens 5 119 5 123 50 554 50 589
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 697 50 810
protoboeuf-encode 5 200 5 197 50 800 50 793
rack 5 441 5 444 50 710 50 747
ruby-json 5 84 5 105 50 49 50 83
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 23 50 10 50 11
splay 5 209 5 221 50 250 50 282
sudoku 5 48 5 50 50 155 50 157
tinygql 5 41 5 41 50 37 50 53
30k_ifelse 5 28 5 28 50 186 50 186
30k_methods 5 38 5 39 50 458 50 456
attr_accessor 5 157 5 183 50 1833 50 1897
cfunc_itself 5 347 5 314 50 1255 50 1259
fib 5 125 5 134 50 939 50 939
getivar 5 217 5 325 50 2305 50 2431
getivar-module 5 100 5 138 50 89 50 225
keyword_args 5 102 5 101 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 469 50 297 50 1499
object-new-initialize 5 169 5 234 50 259 50 1022
object-new-no-escape 5 81 5 135 50 89 50 516
respond_to 5 139 5 126 50 3902 50 3898
ruby-xor 5 247 5 225 50 1305 50 1295
send_bmethod 5 118 5 117 50 5538 50 4526
send_cfunc_block 5 105 5 105 50 306 50 311
send_rubyfunc_block 5 196 5 201 50 1372 50 1376
setivar 5 359 5 375 50 4930 50 4954
setivar_object 5 341 5 295 50 762 50 597
setivar_young 5 341 5 296 50 807 50 608
str_concat 5 392 5 455 50 1202 50 1170
structaref 5 153 5 193 50 1799 50 1882
structaset 5 198 5 238 50 370 50 485
throw 5 1109 5 1412 50 1441 50 1915

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) 1549907 1366187 203 2651 0 0% 0 0 73.406639
chunky-png (click) 325097 307262 79 1376 1 0% 0 0 38.075207
erubi-rails (click) 1377938 1252158 268 3626 23 0% 0 0 100.233642
hexapdf (click) 1534360 1287583 594 15782 44 0% 0 0 430.372377
liquid-c (click) 565435 475830 114 2240 5 0% 0 0 59.39984
liquid-compile (click) 488845 437000 146 2774 2 0% 0 0 85.470385
liquid-render (click) 673043 593316 131 2963 8 0% 0 0 77.675141
lobsters (click) 8561052 7155527 3125 63526 124 0% 0 0 2131.742487
mail (click) 875822 866132 345 7738 40 0% 0 0 209.52488
psych-load (click) 289568 232005 61 833 2 0% 0 0 23.502523
railsbench (click) 3358412 2996892 1592 19740 104 0% 0 0 535.76245
rubocop (click) 5790853 5031072 3002 57190 127 0% 6 0 1644.735181
ruby-lsp (click) 1047548 909110 409 7472 47 0% 1 0 200.460782
sequel (click) 507494 433724 11 119 0 0% 0 0 4.655863
shipit (click) 6895716 5875990 3134 50184 147 0% 0 0 1618.444728
addressable-equality (click) 318810 260462 44 1384 1 0% 0 0 35.314055
addressable-getters (click) 281343 246856 26 869 0 0% 0 0 22.036316
addressable-join (click) 286192 238420 24 941 0 0% 0 0 26.016691
addressable-merge (click) 287494 259359 27 900 0 0% 0 0 25.111439
addressable-new (click) 261300 246995 21 569 0 0% 0 0 14.399926
addressable-normalize (click) 315161 256681 43 1352 1 0% 0 0 34.347779
addressable-parse (click) 281195 229200 26 880 0 0% 0 0 22.427994
addressable-setters (click) 261244 207994 20 582 0 0% 0 0 15.520269
addressable-to-s (click) 278455 259386 26 853 0 0% 0 0 21.14239
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.731826
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.76767
erubi (click) 248132 212190 6 134 0 0% 0 0 3.95755
etanni (click) 32989 26478 8 114 0 0% 0 0 3.401445
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.841595
fluentd (click) 490192 412472 7 116 0 0% 0 0 3.59733
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.547791
graphql (click) 412293 374596 73 1931 19 0% 0 0 53.015126
graphql-native (click) 358645 303134 39 532 0 0% 0 0 13.726455
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.770033
lee (click) 321482 305491 49 1093 0 0% 0 0 30.238451
matmul (click) 11103 4709 8 136 0 0% 0 0 4.111813
nbody (click) 14448 21176 6 251 0 0% 0 0 6.108291
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.221498
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.80884
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.783205
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 43.430434
rack (click) 284373 266970 35 581 0 0% 0 0 16.360879
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.863022
rubyboy (click) 705940 613657 154 6873 42 0% 0 0 162.531703
rubykon (click) 150308 149737 138 2125 4 0% 0 0 55.840642
splay (click) 34953 22682 9 175 0 0% 0 0 5.370772
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.803903
tinygql (click) 301100 261905 59 1026 5 0% 0 0 26.480766
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1864.169167
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 472.642725
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.09712
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.467136
fib (click) 2659 2995 3 30 0 0% 0 0 1.091889
getivar (click) 3789 6778 3 79 0 0% 0 0 1.960793
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.301012
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.802974
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.884372
object-new (click) 2406 2818 2 36 0 0% 0 0 0.994796
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.272496
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.940781
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.13665
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.813343
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.811187
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.280606
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.735854
setivar (click) 2783 3726 3 46 0 0% 0 0 1.250524
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.400588
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.725276
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.403497
structaref (click) 4407 9095 3 88 0 0% 0 0 2.361715
structaset (click) 4113 5834 3 70 0 0% 0 0 1.779603
throw (click) 5953 4624 5 53 0 0% 0 0 1.757564

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.