Ruby Benchmarks

Details for Benchmarks at 2026-06-26 01:23:23 UTC

YJIT metrics from the ruby-bench suite using Ruby 17da26ee1c.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 100.8% faster than CRuby 4.1.0dev
  • 9.8% faster than YJIT 3.4.7
On railsbench it is
  • 118.8% faster than CRuby 4.1.0dev
  • 17.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 5 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 92 5 90 50 197 50 235
chunky-png 5 32 5 30 50 33 50 25
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 443 50 625 50 672
liquid-compile 5 417 5 512 50 579 50 848
liquid-render 5 172 5 174 50 435 50 469
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 208 50 253 50 303
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 156 50 248 50 248
ruby-lsp 5 156 5 158 50 223 50 234
sequel 5 424 5 469 50 598 50 666
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 29 50 12 50 18
addressable-getters 5 165 5 171 50 182 50 208
addressable-join 5 72 5 83 50 65 50 83
addressable-merge 5 161 5 157 50 223 50 243
addressable-new 5 353 5 340 50 520 50 541
addressable-normalize 5 52 5 57 50 60 50 72
addressable-parse 5 104 5 106 50 103 50 119
addressable-setters 5 185 5 184 50 234 50 256
addressable-to-s 5 165 5 171 50 182 50 208
binarytrees 5 82 5 87 50 136 50 145
blurhash 5 83 5 84 50 145 50 145
erubi 5 141 5 148 50 129 50 152
etanni 5 100 5 80 50 73 50 48
fannkuchredux 5 55 5 58 50 101 50 104
fluentd 5 62 5 64 50 20 50 26
gcbench 5 10 5 10 50 10 50 16
graphql 5 372 5 472 50 571 50 976
graphql-native 5 59 5 89 50 22 50 69
knucleotide 5 163 5 145 50 117 50 99
lee 5 23 5 29 50 10 50 16
matmul 5 53 5 53 50 88 50 96
nbody 5 250 5 243 50 663 50 639
nqueens 5 119 5 128 50 554 50 567
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 183 50 697 50 800
protoboeuf-encode 5 201 5 191 50 804 50 767
rack 5 444 5 479 50 704 50 797
ruby-json 5 84 5 114 50 50 50 94
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 206 50 247 50 247
sudoku 5 48 5 50 50 155 50 157
tinygql 5 41 5 44 50 40 50 56
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 39 50 459 50 456
attr_accessor 5 157 5 172 50 1832 50 1868
cfunc_itself 5 347 5 313 50 1255 50 1258
fib 5 125 5 137 50 939 50 938
getivar 5 210 5 330 50 2312 50 2437
getivar-module 5 103 5 133 50 89 50 280
keyword_args 5 102 5 101 50 1240 50 1245
loops-times 5 23 5 26 50 63 50 58
object-new 5 268 5 476 50 297 50 1445
object-new-initialize 5 168 5 230 50 259 50 989
object-new-no-escape 5 80 5 138 50 89 50 505
respond_to 5 139 5 126 50 3902 50 3899
ruby-xor 5 247 5 232 50 1305 50 1307
send_bmethod 5 118 5 109 50 5539 50 4526
send_cfunc_block 5 107 5 103 50 308 50 291
send_rubyfunc_block 5 196 5 193 50 1372 50 1375
setivar 5 359 5 378 50 4930 50 4956
setivar_object 5 341 5 304 50 761 50 661
setivar_young 5 341 5 304 50 807 50 685
str_concat 5 391 5 428 50 1200 50 1035
structaref 5 153 5 168 50 1796 50 1839
structaset 5 198 5 206 50 370 50 486
throw 5 1110 5 1379 50 1446 50 1761

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) 1564189 1271229 203 2657 0 0% 0 0 73.806695
chunky-png (click) 325946 292438 79 1376 1 0% 0 0 38.494294
erubi-rails (click) 1388030 1160212 268 3626 23 0% 0 0 93.745939
hexapdf (click) 1535468 1298596 593 15769 44 0% 0 0 427.948109
liquid-c (click) 558413 452403 114 2240 5 0% 0 0 58.535537
liquid-compile (click) 473067 412013 146 2669 2 0% 0 0 73.829434
liquid-render (click) 664773 624929 131 2963 8 0% 0 0 77.53185
lobsters (click) 8526390 7142517 3124 63145 124 0% 0 0 2011.307973
mail (click) 872136 789901 345 7739 40 0% 0 0 208.268055
psych-load (click) 293257 245644 61 829 2 0% 0 0 23.566205
railsbench (click) 3360946 2840342 1592 19742 105 0% 0 0 538.395925
rubocop (click) 5806126 5075369 3002 57352 127 0% 6 0 1645.480613
ruby-lsp (click) 1043771 849276 409 7470 47 0% 1 0 198.980305
sequel (click) 509834 418271 11 119 0 0% 0 0 4.305047
shipit (click) 7056984 6090698 3124 49990 147 0% 0 0 1579.701891
addressable-equality (click) 325090 300933 44 1381 1 0% 0 0 33.085322
addressable-getters (click) 286285 253293 26 863 0 0% 0 0 20.197326
addressable-join (click) 281960 225446 24 941 0 0% 0 0 22.81381
addressable-merge (click) 291803 248047 27 896 0 0% 0 0 21.376999
addressable-new (click) 247675 190031 21 563 0 0% 0 0 13.678886
addressable-normalize (click) 321355 280787 43 1327 1 0% 0 0 31.591867
addressable-parse (click) 288997 263355 26 880 0 0% 0 0 20.960363
addressable-setters (click) 266829 247836 20 582 0 0% 0 0 14.014703
addressable-to-s (click) 276076 215815 26 849 0 0% 0 0 19.953019
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.756001
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.928548
erubi (click) 252789 226534 6 134 0 0% 0 0 3.792938
etanni (click) 32989 26478 8 114 0 0% 0 0 3.41356
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.801827
fluentd (click) 517903 454234 7 116 0 0% 0 0 3.569622
gcbench (click) 15640 8771 9 110 0 0% 0 0 3.383211
graphql (click) 417941 398345 74 1940 19 0% 0 0 52.58685
graphql-native (click) 362125 299651 39 532 0 0% 0 0 13.666479
knucleotide (click) 9939 10477 7 110 0 0% 0 0 5.113425
lee (click) 322939 299824 50 1102 0 0% 0 0 30.684615
matmul (click) 11103 4709 8 136 0 0% 0 0 4.06634
nbody (click) 14448 21176 6 251 0 0% 0 0 6.113793
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.204533
optcarrot (click) 321739 302768 188 4597 34 0% 0 0 106.504709
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.481488
protoboeuf-encode (click) 242245 233890 14 1820 0 0% 0 0 42.860094
rack (click) 289104 257356 35 581 0 0% 0 0 14.562035
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.741285
rubyboy (click) 709070 610109 154 6871 42 0% 0 0 162.984923
rubykon (click) 147788 154811 138 2094 4 0% 0 0 54.76158
splay (click) 34617 22483 9 175 0 0% 0 0 5.308913
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.989331
tinygql (click) 305123 267690 59 1026 5 0% 0 0 26.482291
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1871.030761
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 480.890713
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.089923
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.494749
fib (click) 2659 2995 3 30 0 0% 0 0 1.099101
getivar (click) 3789 6778 3 79 0 0% 0 0 1.943086
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.360018
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.788281
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.880435
object-new (click) 2406 2818 2 36 0 0% 0 0 1.010205
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.293646
object-new-no-escape (click) 4295 4675 5 63 0 0% 0 0 1.787954
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.132944
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.782001
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.807124
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.269468
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.731592
setivar (click) 2783 3726 3 46 0 0% 0 0 1.283945
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.414566
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.701001
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.45753
structaref (click) 4407 9095 3 88 0 0% 0 0 2.354605
structaset (click) 4113 5834 3 70 0 0% 0 0 1.788963
throw (click) 5953 4624 5 53 0 0% 0 0 1.765832

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.