Ruby Benchmarks

Details for Benchmarks at 2026-03-19 00:54:55 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.0% faster than CRuby 4.1.0dev
  • 6.2% faster than YJIT 3.4.7
On railsbench it is
  • 112.6% faster than CRuby 4.1.0dev
  • 13.4% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 7 minutes
aarch64 runtime: 7 hours, 54 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 99 50 198 50 246
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 438 50 624 50 647
liquid-compile 5 419 5 478 50 580 50 731
liquid-render 5 171 5 176 50 435 50 454
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 201 50 253 50 268
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 258
ruby-lsp 5 164 5 163 50 232 50 233
sequel 5 427 5 436 50 604 50 614
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 206
addressable-join 5 74 5 81 50 66 50 76
addressable-merge 5 159 5 162 50 222 50 228
addressable-new 5 357 5 358 50 525 50 533
addressable-normalize 5 54 5 56 50 59 50 63
addressable-parse 5 104 5 108 50 104 50 113
addressable-setters 5 182 5 190 50 231 50 241
addressable-to-s 5 163 5 172 50 183 50 199
binarytrees 5 82 5 86 50 136 50 148
blurhash 5 83 5 86 50 139 50 145
erubi 5 137 5 151 50 137 50 150
etanni 5 99 5 77 50 72 50 41
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 59 5 61 50 30 50 33
gcbench 5 10 5 10 50 10 50 10
graphql 5 371 5 463 50 568 50 933
graphql-native 5 56 5 88 50 22 50 72
knucleotide 5 163 5 162 50 118 50 116
lee 5 23 5 30 50 10 50 10
matmul 5 51 5 53 50 95 50 96
nbody 5 246 5 266 50 674 50 666
nqueens 5 108 5 128 50 556 50 594
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 706 50 783
protoboeuf-encode 5 193 5 200 50 833 50 796
rack 5 437 5 458 50 706 50 733
ruby-json 5 81 5 102 50 47 50 74
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 210 5 231 50 245 50 286
sudoku 5 48 5 49 50 156 50 166
tinygql 5 41 5 44 50 40 50 51
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 457 50 454
attr_accessor 5 157 5 195 50 1835 50 1914
cfunc_itself 5 348 5 355 50 1255 50 1259
fib 5 124 5 142 50 939 50 939
getivar 5 217 5 296 50 2314 50 2410
getivar-module 5 103 5 127 50 90 50 261
keyword_args 5 100 5 97 50 1240 50 1243
loops-times 5 23 5 25 50 64 50 62
object-new 5 269 5 413 50 297 50 920
object-new-initialize 5 169 5 245 50 258 50 754
object-new-no-escape 5 81 5 130 50 90 50 369
respond_to 5 139 5 138 50 3889 50 3901
ruby-xor 5 236 5 252 50 1314 50 1299
send_bmethod 5 117 5 126 50 5538 50 4527
send_cfunc_block 5 106 5 104 50 353 50 382
send_rubyfunc_block 5 250 5 252 50 6923 50 6917
setivar 5 359 5 465 50 4923 50 5032
setivar_object 5 341 5 302 50 753 50 645
setivar_young 5 342 5 305 50 801 50 667
str_concat 5 391 5 437 50 1199 50 1175
structaref 5 156 5 190 50 1810 50 1876
structaset 5 202 5 245 50 399 50 480
throw 5 1088 5 1474 50 1420 50 1931

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) 1553833 1302059 203 2657 0 0% 0 0 76.5319
chunky-png (click) 320742 294617 79 1376 1 0% 0 0 39.407109
erubi-rails (click) 1374145 1219654 268 3648 22 0% 0 0 98.056176
hexapdf (click) 1514163 1242564 593 15712 44 0% 0 0 440.043327
liquid-c (click) 557943 503094 114 2236 5 0% 0 0 59.413835
liquid-compile (click) 478403 378643 146 2694 2 0% 0 0 78.667805
liquid-render (click) 653710 524240 131 2959 8 0% 0 0 79.729919
lobsters (click) 8690858 7319692 3126 64119 120 0% 0 0 2105.053215
mail (click) 863133 830849 345 7728 40 0% 0 0 215.827441
psych-load (click) 285853 245412 61 831 2 0% 0 0 24.099057
railsbench (click) 3352806 2934602 1592 19728 97 0% 0 0 552.535824
rubocop (click) 5779594 5085833 3002 57104 126 0% 6 0 1781.536945
ruby-lsp (click) 1044351 888728 408 7446 46 0% 1 0 206.314865
sequel (click) 503108 446270 11 119 0 0% 0 0 3.880993
shipit (click) 7258309 6116437 3360 54558 144 0% 2 0 1803.603682
addressable-equality (click) 317100 267627 44 1380 1 0% 0 0 34.909739
addressable-getters (click) 275052 232802 26 863 0 0% 0 0 20.879272
addressable-join (click) 282405 226918 24 941 0 0% 0 0 23.751455
addressable-merge (click) 282842 262605 27 896 0 0% 0 0 22.64371
addressable-new (click) 257427 235387 21 565 0 0% 0 0 14.249851
addressable-normalize (click) 310458 285071 43 1329 1 0% 0 0 32.951082
addressable-parse (click) 279904 195930 26 882 0 0% 0 0 22.185198
addressable-setters (click) 257456 212876 20 582 0 0% 0 0 14.559192
addressable-to-s (click) 274660 248140 26 849 0 0% 0 0 20.688245
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.777893
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.161876
erubi (click) 248782 221868 6 134 0 0% 0 0 4.02844
etanni (click) 32494 34168 8 114 0 0% 0 0 3.453985
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.179079
fluentd (click) 487909 395291 7 116 0 0% 0 0 3.685054
gcbench (click) 15808 8981 9 110 0 0% 0 0 3.482643
graphql (click) 407483 370730 73 1909 19 0% 0 0 54.196164
graphql-native (click) 353916 306522 39 532 0 0% 0 0 14.379449
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.724527
lee (click) 315681 242028 49 1102 0 0% 0 0 32.176709
matmul (click) 11103 4709 8 136 0 0% 0 0 4.150089
nbody (click) 14448 21176 6 251 0 0% 0 0 6.237956
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.43921
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.566507
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 74.027506
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.335059
rack (click) 281295 248339 35 581 0 0% 0 0 15.27253
ruby-json (click) 19917 18004 8 206 0 0% 0 0 5.792419
rubyboy (click) 704971 597391 154 6877 42 0% 0 0 169.376885
rubykon (click) 150715 174889 138 2130 4 0% 0 0 57.676446
splay (click) 34953 22682 9 175 0 0% 0 0 5.248291
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.063899
tinygql (click) 300425 253882 59 1031 5 0% 0 0 27.510555
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1976.494954
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.660745
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.134566
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.492731
fib (click) 2659 2995 3 30 0 0% 0 0 1.15655
getivar (click) 3789 6778 3 79 0 0% 0 0 1.954876
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.380017
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.855056
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.941032
object-new (click) 2406 2818 2 36 0 0% 0 0 1.10704
object-new-initialize (click) 3015 3269 4 43 0 0% 0 0 1.335574
object-new-no-escape (click) 4540 5102 5 68 0 0% 0 0 1.994812
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.17221
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.852614
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.825897
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.813283
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.477478
setivar (click) 2783 3726 3 46 0 0% 0 0 1.265957
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.414046
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.768642
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.433048
structaref (click) 4407 9095 3 88 0 0% 0 0 2.530898
structaset (click) 4113 5834 3 70 0 0% 0 0 1.834739
throw (click) 5953 4624 5 53 0 0% 0 0 1.826918

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.