Ruby Benchmarks

Details for Benchmarks at 2026-02-21 00:49:26 UTC

YJIT metrics from the ruby-bench suite using Ruby a8cb7292c6.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.7% faster than CRuby 4.1.0dev
  • 6.4% faster than YJIT 3.4.7
On railsbench it is
  • 115.1% faster than CRuby 4.1.0dev
  • 13.6% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 24 minutes
aarch64 runtime: 7 hours, 18 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 93 5 100 50 197 50 238
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 419 5 428 50 624 50 637
liquid-compile 5 418 5 479 50 583 50 736
liquid-render 5 173 5 177 50 432 50 445
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 194 50 252 50 283
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 160 50 249 50 252
ruby-lsp 5 160 5 163 50 231 50 234
sequel 5 423 5 438 50 580 50 627
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 14
addressable-getters 5 164 5 172 50 183 50 203
addressable-join 5 73 5 80 50 65 50 75
addressable-merge 5 159 5 161 50 221 50 227
addressable-new 5 353 5 358 50 525 50 534
addressable-normalize 5 53 5 55 50 59 50 64
addressable-parse 5 102 5 107 50 103 50 115
addressable-setters 5 184 5 185 50 227 50 241
addressable-to-s 5 163 5 172 50 182 50 202
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 85 50 143 50 144
erubi 5 135 5 141 50 137 50 142
etanni 5 97 5 71 50 71 50 38
fannkuchredux 5 55 5 57 50 102 50 103
fluentd 5 56 5 61 50 20 50 32
graphql 5 369 5 465 50 576 50 930
graphql-native 5 57 5 86 50 22 50 65
knucleotide 5 163 5 160 50 118 50 113
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 95
nbody 5 246 5 295 50 676 50 702
nqueens 5 116 5 126 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 184 50 706 50 767
protoboeuf-encode 5 191 5 199 50 832 50 793
rack 5 441 5 461 50 704 50 723
ruby-json 5 81 5 101 50 46 50 77
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 157
tinygql 5 42 5 43 50 40 50 48
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 41 50 456 50 456
attr_accessor 5 157 5 193 50 1835 50 1913
cfunc_itself 5 348 5 353 50 1255 50 1259
fib 5 124 5 139 50 939 50 939
getivar 5 218 5 333 50 2315 50 2435
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 102 50 1240 50 1242
loops-times 5 23 5 26 50 63 50 63
object-new 5 268 5 410 50 296 50 902
respond_to 5 139 5 138 50 3889 50 3904
ruby-xor 5 236 5 244 50 1314 50 1298
send_bmethod 5 117 5 124 50 5539 50 4527
send_cfunc_block 5 107 5 103 50 353 50 382
send_rubyfunc_block 5 251 5 251 50 6917 50 6930
setivar 5 359 5 481 50 4922 50 5045
setivar_object 5 341 5 305 50 752 50 641
setivar_young 5 341 5 309 50 796 50 661
str_concat 5 391 5 456 50 1201 50 1174
structaref 5 156 5 209 50 1809 50 1906
structaset 5 201 5 271 50 397 50 497
throw 5 1090 5 1446 50 1401 50 1882

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) 1553977 1334790 203 2663 0 0% 0 0 75.831706
chunky-png (click) 317009 300301 79 1376 1 0% 0 0 39.323799
erubi-rails (click) 1373302 1104083 268 3626 22 0% 0 0 97.057596
hexapdf (click) 1526604 1273266 593 15720 44 0% 0 0 436.987745
liquid-c (click) 561006 507512 114 2236 5 0% 0 0 59.19851
liquid-compile (click) 481419 415906 146 2717 2 0% 0 0 79.543953
liquid-render (click) 665910 579861 131 2959 8 0% 0 0 79.778776
lobsters (click) 8718664 7342468 3124 64376 120 0% 0 0 2123.309014
mail (click) 872192 782006 345 7728 40 0% 0 0 213.197718
psych-load (click) 287887 247761 61 831 2 0% 0 0 24.005213
railsbench (click) 3359271 2983787 1592 19785 97 0% 0 0 558.503992
rubocop (click) 5778963 4970475 3002 57109 126 0% 6 0 1690.959506
ruby-lsp (click) 1039113 844273 408 7446 46 0% 1 0 205.422438
sequel (click) 503024 389239 11 119 0 0% 0 0 3.87786
shipit (click) 7141493 6026275 3299 52230 168 0% 0 0 1732.617682
addressable-equality (click) 317102 284145 44 1389 1 0% 0 0 34.730204
addressable-getters (click) 279750 197835 26 905 0 0% 0 0 21.850181
addressable-join (click) 283094 228380 24 941 0 0% 0 0 23.59777
addressable-merge (click) 283027 247183 27 896 0 0% 0 0 22.187446
addressable-new (click) 244868 238336 21 565 0 0% 0 0 14.243248
addressable-normalize (click) 312698 255459 43 1327 1 0% 0 0 32.741934
addressable-parse (click) 280156 237918 26 880 0 0% 0 0 21.655971
addressable-setters (click) 258053 222396 20 582 0 0% 0 0 14.57621
addressable-to-s (click) 277047 251381 26 849 0 0% 0 0 20.674927
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.814303
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.356753
erubi (click) 248343 222609 6 134 0 0% 0 0 3.875673
etanni (click) 33355 27108 8 114 0 0% 0 0 3.444502
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.093031
fluentd (click) 487528 435836 7 116 0 0% 0 0 3.742486
graphql (click) 409268 389439 73 1909 19 0% 0 0 53.804627
graphql-native (click) 354693 308487 39 532 0 0% 0 0 14.101288
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.949656
lee (click) 318016 253443 49 1099 0 0% 0 0 31.096043
matmul (click) 11103 4709 8 136 0 0% 0 0 4.265741
nbody (click) 14448 21176 6 251 0 0% 0 0 6.090681
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.380141
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.59408
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.708191
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.1807
rack (click) 283854 243468 35 581 0 0% 0 0 15.18591
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.763948
rubyboy (click) 704877 688137 154 6873 42 0% 0 0 167.531475
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.418186
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.163692
tinygql (click) 301407 288457 59 1037 5 0% 0 0 27.821335
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1950.710295
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.805139
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.070817
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.48318
fib (click) 2659 2995 3 30 0 0% 0 0 1.110146
getivar (click) 3789 6778 3 79 0 0% 0 0 1.901495
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334819
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.839928
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.926023
object-new (click) 2406 2818 2 36 0 0% 0 0 1.094731
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.14468
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.820025
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.77927
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.740495
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.446392
setivar (click) 2783 3726 3 46 0 0% 0 0 1.248882
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.399754
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.69905
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.444582
structaref (click) 4407 9095 3 88 0 0% 0 0 2.334364
structaset (click) 4113 5834 3 70 0 0% 0 0 1.771405
throw (click) 5953 4624 5 53 0 0% 0 0 1.80781

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.