Ruby Benchmarks

Details for Benchmarks at 2026-03-20 00:51:57 UTC

YJIT metrics from the ruby-bench suite using Ruby 1a2d8c7860.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.8% faster than CRuby 4.1.0dev
  • 7.0% faster than YJIT 3.4.7
On railsbench it is
  • 117.2% faster than CRuby 4.1.0dev
  • 14.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 6 minutes
aarch64 runtime: 7 hours, 53 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 100 50 199 50 245
chunky-png 5 31 5 33 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 423 5 434 50 627 50 652
liquid-compile 5 420 5 484 50 583 50 725
liquid-render 5 172 5 173 50 412 50 454
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 203 50 253 50 267
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 161 50 248 50 256
ruby-lsp 5 155 5 160 50 240 50 233
sequel 5 425 5 437 50 599 50 615
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 174 50 183 50 200
addressable-join 5 74 5 81 50 66 50 76
addressable-merge 5 160 5 162 50 223 50 229
addressable-new 5 350 5 359 50 526 50 539
addressable-normalize 5 53 5 55 50 59 50 64
addressable-parse 5 103 5 108 50 103 50 113
addressable-setters 5 185 5 190 50 230 50 247
addressable-to-s 5 164 5 172 50 182 50 204
binarytrees 5 82 5 86 50 136 50 149
blurhash 5 83 5 86 50 143 50 145
erubi 5 137 5 151 50 139 50 150
etanni 5 98 5 77 50 72 50 41
fannkuchredux 5 54 5 57 50 102 50 102
fluentd 5 62 5 64 50 21 50 28
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 459 50 570 50 954
graphql-native 5 59 5 88 50 22 50 69
knucleotide 5 163 5 162 50 117 50 116
lee 5 23 5 30 50 10 50 10
matmul 5 51 5 52 50 94 50 96
nbody 5 246 5 266 50 677 50 667
nqueens 5 116 5 128 50 556 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 181 50 707 50 786
protoboeuf-encode 5 196 5 202 50 830 50 793
rack 5 443 5 460 50 719 50 733
ruby-json 5 81 5 101 50 46 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 211 5 231 50 245 50 286
sudoku 5 48 5 49 50 156 50 166
tinygql 5 41 5 43 50 40 50 48
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 447 50 454
attr_accessor 5 157 5 195 50 1833 50 1914
cfunc_itself 5 349 5 355 50 1255 50 1259
fib 5 123 5 142 50 939 50 939
getivar 5 217 5 298 50 2319 50 2408
getivar-module 5 104 5 127 50 90 50 261
keyword_args 5 100 5 98 50 1240 50 1243
loops-times 5 23 5 24 50 64 50 61
object-new 5 268 5 412 50 296 50 916
object-new-initialize 5 168 5 246 50 258 50 756
object-new-no-escape 5 81 5 130 50 90 50 373
respond_to 5 139 5 137 50 3892 50 3902
ruby-xor 5 236 5 252 50 1313 50 1298
send_bmethod 5 116 5 126 50 5538 50 4514
send_cfunc_block 5 106 5 104 50 353 50 384
send_rubyfunc_block 5 250 5 255 50 6924 50 6922
setivar 5 359 5 464 50 4923 50 5032
setivar_object 5 341 5 302 50 750 50 647
setivar_young 5 341 5 305 50 794 50 665
str_concat 5 391 5 434 50 1202 50 1178
structaref 5 157 5 192 50 1812 50 1876
structaset 5 201 5 245 50 398 50 479
throw 5 1092 5 1473 50 1422 50 1921

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) 1549504 1313793 203 2652 0 0% 0 0 75.270968
chunky-png (click) 320747 302809 79 1376 1 0% 0 0 39.168692
erubi-rails (click) 1380228 1218546 268 3692 22 0% 0 0 99.202396
hexapdf (click) 1527230 1289859 594 15732 44 0% 0 0 438.777625
liquid-c (click) 558113 478709 114 2236 5 0% 0 0 59.66062
liquid-compile (click) 482366 424087 146 2749 2 0% 0 0 79.796284
liquid-render (click) 665128 602387 131 2959 8 0% 0 0 79.947368
lobsters (click) 8687541 7364919 3126 64076 122 0% 0 0 2109.543598
mail (click) 871727 854651 345 7728 40 0% 0 0 215.295702
psych-load (click) 288045 280582 61 831 2 0% 0 0 24.142269
railsbench (click) 3352932 2909493 1592 19768 97 0% 0 0 555.733664
rubocop (click) 5782581 5055647 3002 57128 125 0% 6 0 1679.43122
ruby-lsp (click) 1044356 872324 408 7446 46 0% 1 0 206.950303
sequel (click) 503122 462710 11 119 0 0% 0 0 3.998682
shipit (click) 7121515 6120066 3291 52996 146 0% 0 0 1729.977198
addressable-equality (click) 319445 303108 44 1405 1 0% 0 0 35.023099
addressable-getters (click) 277030 251193 26 863 0 0% 0 0 20.973448
addressable-join (click) 282404 226918 24 941 0 0% 0 0 23.582982
addressable-merge (click) 282842 262605 27 896 0 0% 0 0 22.532637
addressable-new (click) 256642 202016 21 569 0 0% 0 0 14.153572
addressable-normalize (click) 312610 262828 43 1327 1 0% 0 0 33.030234
addressable-parse (click) 279463 220067 26 880 0 0% 0 0 21.781801
addressable-setters (click) 257461 212881 20 582 0 0% 0 0 14.546625
addressable-to-s (click) 278320 219578 26 889 0 0% 0 0 21.583575
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.828611
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.22466
erubi (click) 247345 212163 6 134 0 0% 0 0 3.9888
etanni (click) 33079 34952 8 114 0 0% 0 0 3.436284
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.071356
fluentd (click) 487611 378588 7 116 0 0% 0 0 3.817938
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.487199
graphql (click) 409531 381027 73 1909 19 0% 0 0 53.792883
graphql-native (click) 354004 306631 39 532 0 0% 0 0 13.927247
knucleotide (click) 9939 10477 7 110 0 0% 0 0 5.832515
lee (click) 305925 231268 49 1099 0 0% 0 0 31.462822
matmul (click) 11103 4709 8 136 0 0% 0 0 4.151095
nbody (click) 14448 21176 6 251 0 0% 0 0 6.200649
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.425767
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.085831
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.842407
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.275468
rack (click) 285826 246302 35 628 0 0% 0 0 16.285269
ruby-json (click) 20047 18184 8 206 0 0% 0 0 5.767633
rubyboy (click) 704679 597060 154 6871 42 0% 0 0 169.5372
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.890445
splay (click) 34953 22682 9 175 0 0% 0 0 5.284761
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.035448
tinygql (click) 300132 245374 59 1031 5 0% 0 0 27.262856
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1984.114536
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.176441
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.143168
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.541368
fib (click) 2659 2995 3 30 0 0% 0 0 1.116359
getivar (click) 3789 6778 3 79 0 0% 0 0 2.017178
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.397233
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.843058
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.921771
object-new (click) 2406 2818 2 36 0 0% 0 0 1.072839
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.313098
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.034595
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.197006
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.862685
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.841238
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.826049
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.456399
setivar (click) 2783 3726 3 46 0 0% 0 0 1.287015
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.458806
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.770394
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.465884
structaref (click) 4407 9095 3 88 0 0% 0 0 2.39882
structaset (click) 4113 5834 3 70 0 0% 0 0 1.817715
throw (click) 5953 4624 5 53 0 0% 0 0 1.818745

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.