Ruby Benchmarks

Details for Benchmarks at 2026-07-20 00:57:47 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.3% faster than CRuby 4.1.0dev
  • 5.1% faster than YJIT 3.4.7
On railsbench it is
  • 111.2% faster than CRuby 4.1.0dev
  • 12.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 9 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 90 5 94 50 195 50 208
chunky-png 5 32 5 31 50 34 50 25
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 443 50 615 50 667
liquid-compile 5 417 5 511 50 582 50 832
liquid-il 5 66 5 67 50 116 50 123
liquid-render 5 169 5 170 50 433 50 462
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 208 50 254 50 289
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 154 50 246 50 238
ruby-lsp 5 164 5 162 50 224 50 218
sequel 5 428 5 462 50 595 50 653
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 165 5 168 50 183 50 201
addressable-join 5 75 5 80 50 63 50 80
addressable-merge 5 161 5 157 50 222 50 229
addressable-new 5 352 5 334 50 521 50 505
addressable-normalize 5 53 5 57 50 60 50 69
addressable-parse 5 103 5 104 50 103 50 114
addressable-setters 5 184 5 183 50 234 50 245
addressable-to-s 5 164 5 168 50 182 50 202
binarytrees 5 82 5 88 50 136 50 163
blurhash 5 84 5 84 50 145 50 145
erubi 5 138 5 153 50 124 50 157
etanni 5 100 5 80 50 72 50 48
fannkuchredux 5 55 5 58 50 101 50 111
fluentd 5 61 5 65 50 29 50 26
gcbench 5 10 5 10 50 10 50 10
graphql 5 370 5 460 50 569 50 900
graphql-native 5 58 5 84 50 21 50 61
knucleotide 5 164 5 144 50 118 50 97
lee 5 23 5 30 50 10 50 19
matmul 5 53 5 52 50 87 50 100
nbody 5 250 5 251 50 663 50 698
nqueens 5 119 5 123 50 554 50 605
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 181 50 697 50 692
protoboeuf-encode 5 200 5 201 50 797 50 807
rack 5 442 5 456 50 710 50 746
ruby-json 5 84 5 113 50 51 50 93
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 202 50 250 50 233
string_malloc_pressure 5 146 5 35 50 102 50 10
sudoku 5 48 5 50 50 155 50 164
tinygql 5 40 5 43 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 454 50 456
attr_accessor 5 157 5 169 50 1834 50 1868
cfunc_itself 5 348 5 311 50 1255 50 1258
fib 5 125 5 136 50 939 50 939
getivar 5 215 5 305 50 2313 50 2411
getivar-module 5 103 5 140 50 89 50 132
keyword_args 5 102 5 96 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 480 50 295 50 1523
object-new-initialize 5 168 5 255 50 260 50 528
object-new-no-escape 5 81 5 141 50 89 50 368
respond_to 5 139 5 127 50 3903 50 3898
ruby-xor 5 247 5 236 50 1305 50 1316
send_bmethod 5 118 5 115 50 5539 50 4526
send_cfunc_block 5 107 5 102 50 306 50 290
send_rubyfunc_block 5 196 5 212 50 1372 50 1375
send_rubyfunc_inline 5 30 5 36 50 297 50 298
setivar 5 359 5 349 50 4930 50 4923
setivar_object 5 341 5 271 50 762 50 583
setivar_young 5 342 5 271 50 809 50 582
str_concat 5 390 5 424 50 1200 50 1062
structaref 5 153 5 177 50 1799 50 1852
structaset 5 198 5 226 50 371 50 477
throw 5 1113 5 1331 50 1441 50 1735

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) 1563182 1361446 204 2676 0 0% 0 0 74.681734
chunky-png (click) 325212 317247 79 1372 1 0% 0 0 38.092239
erubi-rails (click) 1384010 1159405 268 3630 23 0% 0 0 93.526863
hexapdf (click) 1529845 1335162 594 15695 44 0% 0 0 424.138955
liquid-c (click) 562884 519976 114 2226 5 0% 0 0 58.013946
liquid-compile (click) 482090 426502 146 2679 2 0% 0 0 72.698094
liquid-il (click) 598997 507486 70 2714 0 0% 0 0 79.048548
liquid-render (click) 669865 611613 131 2945 8 0% 0 0 76.736605
lobsters (click) 8523912 7202921 3125 62936 125 0% 0 0 2018.526513
mail (click) 858467 793610 345 7654 40 0% 0 0 205.321955
psych-load (click) 290287 228575 60 820 2 0% 0 0 23.44232
railsbench (click) 3361362 2818565 1592 19738 105 0% 0 0 537.611342
rubocop (click) 5770201 4995676 3001 57005 129 0% 6 0 1715.249661
ruby-lsp (click) 1048581 894775 408 7414 47 0% 1 0 198.043879
sequel (click) 511496 383219 11 119 0 0% 0 0 4.019892
shipit (click) 6874303 5782283 3136 49905 147 0% 0 0 1598.675299
addressable-equality (click) 326141 294896 44 1381 1 0% 0 0 33.609963
addressable-getters (click) 284509 235637 26 863 0 0% 0 0 20.217796
addressable-join (click) 291916 254571 24 941 0 0% 0 0 23.520947
addressable-merge (click) 276187 237501 27 896 0 0% 0 0 21.145594
addressable-new (click) 266778 246445 21 563 0 0% 0 0 13.653002
addressable-normalize (click) 321494 289864 43 1327 1 0% 0 0 31.809628
addressable-parse (click) 289136 247856 26 880 0 0% 0 0 21.105108
addressable-setters (click) 266968 224145 20 582 0 0% 0 0 14.078176
addressable-to-s (click) 283205 233301 26 849 0 0% 0 0 19.956096
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.800762
blurhash (click) 52495 43786 27 607 0 0% 0 0 17.847452
erubi (click) 252205 210271 6 134 0 0% 0 0 3.810809
etanni (click) 32989 26478 8 114 0 0% 0 0 3.455288
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.860887
fluentd (click) 508247 427532 7 116 0 0% 0 0 3.635206
gcbench (click) 15893 8734 9 110 0 0% 0 0 3.559347
graphql (click) 408202 371095 74 1939 19 0% 0 0 53.089319
graphql-native (click) 351421 328788 39 532 0 0% 0 0 13.570066
knucleotide (click) 9961 2328 7 110 0 0% 0 0 4.698414
lee (click) 322689 300279 50 1101 0 0% 0 0 30.593138
matmul (click) 11103 4709 8 136 0 0% 0 0 4.121009
nbody (click) 14448 21176 6 251 0 0% 0 0 6.112229
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.223121
optcarrot (click) 321859 302768 188 4597 34 0% 0 0 106.359833
protoboeuf (click) 175400 243898 12 2904 0 0% 0 0 74.228601
protoboeuf-encode (click) 247853 316926 14 1820 0 0% 0 0 42.832624
rack (click) 286982 247449 35 581 0 0% 0 0 14.594358
ruby-json (click) 19699 17751 8 206 0 0% 0 0 5.725865
rubyboy (click) 713258 605969 154 6871 42 0% 0 0 162.576712
rubykon (click) 146721 137257 137 2078 3 0% 0 0 54.567904
splay (click) 34682 14303 9 175 0 0% 0 0 5.380277
string_malloc_pressure (click) 4071 3932 6 49 0 0% 0 0 1.715642
sudoku (click) 51776 65830 7 871 0 0% 0 0 22.79093
tinygql (click) 304638 284909 59 1024 5 0% 0 0 26.132361
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1873.817866
30k_methods (click) 2278130 1643075 5780 19370 0 0% 0 0 476.926836
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.081397
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.498376
fib (click) 2659 2995 3 30 0 0% 0 0 1.124514
getivar (click) 3789 6778 3 79 0 0% 0 0 1.923431
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.358532
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.825394
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.900363
object-new (click) 2406 2818 2 36 0 0% 0 0 1.005852
object-new-initialize (click) 3156 3352 4 43 0 0% 0 0 1.299991
object-new-no-escape (click) 4285 4620 5 63 0 0% 0 0 1.726192
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.167335
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.788936
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.809342
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.31858
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.76116
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.066039
setivar (click) 2783 3726 3 46 0 0% 0 0 1.268999
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.437473
setivar_young (click) 4441 4926 4 63 0 0% 0 0 1.706762
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.48969
structaref (click) 4407 9095 3 88 0 0% 0 0 2.330676
structaset (click) 4113 5834 3 70 0 0% 0 0 1.804321
throw (click) 5953 4624 5 53 0 0% 0 0 1.786098

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.