Ruby Benchmarks

Details for Benchmarks at 2026-03-16 00:58:58 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.9% faster than CRuby 4.1.0dev
  • 6.9% faster than YJIT 3.4.7
On railsbench it is
  • 112.7% faster than CRuby 4.1.0dev
  • 14.3% 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 89 5 99 50 204 50 243
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 421 5 437 50 626 50 642
liquid-compile 5 416 5 478 50 583 50 736
liquid-render 5 171 5 175 50 432 50 439
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 198 50 252 50 277
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 161 50 248 50 259
ruby-lsp 5 155 5 163 50 220 50 238
sequel 5 415 5 446 50 601 50 632
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 15
addressable-getters 5 164 5 174 50 184 50 201
addressable-join 5 74 5 81 50 66 50 76
addressable-merge 5 160 5 161 50 222 50 231
addressable-new 5 354 5 363 50 522 50 546
addressable-normalize 5 53 5 55 50 59 50 65
addressable-parse 5 103 5 109 50 103 50 115
addressable-setters 5 184 5 190 50 228 50 249
addressable-to-s 5 162 5 173 50 183 50 203
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 152 50 133 50 157
etanni 5 97 5 75 50 72 50 42
fannkuchredux 5 55 5 57 50 101 50 102
fluentd 5 56 5 63 50 22 50 27
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 475 50 571 50 960
graphql-native 5 59 5 89 50 21 50 65
knucleotide 5 163 5 160 50 117 50 113
lee 5 23 5 31 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 246 5 272 50 677 50 703
nqueens 5 116 5 126 50 556 50 579
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 186 50 706 50 779
protoboeuf-encode 5 192 5 202 50 833 50 774
rack 5 435 5 453 50 705 50 723
ruby-json 5 81 5 102 50 50 50 75
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 231 50 243 50 285
sudoku 5 48 5 49 50 157 50 157
tinygql 5 42 5 44 50 40 50 49
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 40 50 453 50 455
attr_accessor 5 157 5 210 50 1833 50 1936
cfunc_itself 5 348 5 359 50 1255 50 1259
fib 5 124 5 139 50 939 50 940
getivar 5 216 5 293 50 2318 50 2404
getivar-module 5 104 5 124 50 90 50 259
keyword_args 5 100 5 105 50 1240 50 1243
loops-times 5 23 5 24 50 63 50 58
object-new 5 268 5 414 50 298 50 918
object-new-initialize 5 169 5 248 50 258 50 758
object-new-no-escape 5 81 5 130 50 90 50 374
respond_to 5 139 5 139 50 3889 50 3901
ruby-xor 5 236 5 247 50 1313 50 1298
send_bmethod 5 116 5 122 50 5538 50 4527
send_cfunc_block 5 106 5 107 50 353 50 383
send_rubyfunc_block 5 250 5 250 50 6926 50 6919
setivar 5 359 5 443 50 4923 50 5017
setivar_object 5 341 5 294 50 754 50 538
setivar_young 5 341 5 296 50 799 50 561
str_concat 5 391 5 444 50 1201 50 1169
structaref 5 157 5 195 50 1813 50 1887
structaset 5 202 5 255 50 397 50 496
throw 5 1087 5 1379 50 1414 50 1777

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) 1551040 1332522 203 2646 0 0% 0 0 75.305835
chunky-png (click) 320449 302493 79 1376 1 0% 0 0 39.069395
erubi-rails (click) 1378433 1216062 268 3669 22 0% 0 0 98.306288
hexapdf (click) 1525121 1336525 593 15714 44 0% 0 0 440.813998
liquid-c (click) 558613 512528 114 2236 5 0% 0 0 60.269972
liquid-compile (click) 480001 364411 146 2722 2 0% 0 0 78.245166
liquid-render (click) 664918 544833 131 2959 8 0% 0 0 79.818981
lobsters (click) 8708970 7413626 3125 64215 120 0% 0 0 2115.209603
mail (click) 866687 889866 345 7727 40 0% 0 0 216.021573
psych-load (click) 287749 272074 61 831 2 0% 0 0 24.214433
railsbench (click) 3350691 2957070 1592 19711 97 0% 0 0 552.837714
rubocop (click) 5788111 5045958 3002 57186 125 0% 6 0 1672.688867
ruby-lsp (click) 1041709 903163 408 7446 46 0% 1 0 205.391373
sequel (click) 501853 461544 11 119 0 0% 0 0 3.847594
shipit (click) 7481154 6342894 3372 53708 176 0% 1 0 1781.18835
addressable-equality (click) 318294 261334 44 1389 1 0% 0 0 34.991748
addressable-getters (click) 277874 252728 26 863 0 0% 0 0 21.132914
addressable-join (click) 282111 267562 24 941 0 0% 0 0 23.54714
addressable-merge (click) 283279 239203 27 896 0 0% 0 0 22.259645
addressable-new (click) 256973 234860 21 563 0 0% 0 0 14.025646
addressable-normalize (click) 313616 272906 43 1336 1 0% 0 0 33.18661
addressable-parse (click) 279449 252747 26 880 0 0% 0 0 21.688508
addressable-setters (click) 258305 214416 20 582 0 0% 0 0 14.541824
addressable-to-s (click) 272912 229546 26 853 0 0% 0 0 21.067592
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.844412
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.379994
erubi (click) 247047 203650 6 134 0 0% 0 0 3.942317
etanni (click) 32951 34772 8 114 0 0% 0 0 3.502811
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.147784
fluentd (click) 487396 419221 7 116 0 0% 0 0 3.775149
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.538618
graphql (click) 407756 338415 73 1909 19 0% 0 0 53.690575
graphql-native (click) 352224 272191 39 532 0 0% 0 0 14.136308
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.807715
lee (click) 316393 251290 49 1102 0 0% 0 0 31.4799
matmul (click) 11103 4709 8 136 0 0% 0 0 4.209633
nbody (click) 14448 21176 6 251 0 0% 0 0 6.27389
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.491674
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.287694
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 74.412789
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 47.707945
rack (click) 284111 251913 35 581 0 0% 0 0 15.065874
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.808761
rubyboy (click) 704455 637731 154 6877 42 0% 0 0 168.71428
rubykon (click) 149260 164688 138 2112 4 0% 0 0 57.568355
splay (click) 34953 22682 9 175 0 0% 0 0 5.364351
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.300578
tinygql (click) 300132 237182 59 1031 5 0% 0 0 27.230004
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1952.208736
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.731891
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.160345
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.545251
fib (click) 2659 2995 3 30 0 0% 0 0 1.11388
getivar (click) 3789 6778 3 79 0 0% 0 0 1.989053
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.35009
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.836472
loops-times (click) 7093 8387 5 100 0 0% 0 0 3.003285
object-new (click) 2406 2818 2 36 0 0% 0 0 1.058568
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.310736
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 2.008504
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.160999
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.820966
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.853672
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.851905
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.513791
setivar (click) 2783 3726 3 46 0 0% 0 0 1.297417
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.434357
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.748799
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.483247
structaref (click) 4407 9095 3 88 0 0% 0 0 2.388762
structaset (click) 4113 5834 3 70 0 0% 0 0 1.840838
throw (click) 5953 4624 5 53 0 0% 0 0 1.813123

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.