Ruby Benchmarks

Details for Benchmarks at 2026-02-06 00:49:34 UTC

YJIT metrics from the ruby-bench suite using Ruby 728001caae.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.5% faster than CRuby 4.1.0dev
  • 6.3% faster than YJIT 3.4.7
On railsbench it is
  • 114.0% faster than CRuby 4.1.0dev
  • 11.5% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 8 minutes
aarch64 runtime: 7 hours, 2 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 98 50 199 50 238
chunky-png 5 31 5 32 50 33 50 29
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 418 5 430 50 623 50 634
liquid-compile 5 418 5 482 50 583 50 736
liquid-render 5 172 5 176 50 435 50 446
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 193 50 253 50 269
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 158 50 248 50 257
ruby-lsp 5 159 5 162 50 215 50 230
sequel 5 420 5 434 50 580 50 624
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 164 5 173 50 184 50 202
addressable-join 5 73 5 75 50 64 50 70
addressable-merge 5 159 5 159 50 222 50 223
addressable-new 5 354 5 360 50 524 50 537
addressable-normalize 5 53 5 54 50 59 50 62
addressable-parse 5 103 5 105 50 104 50 111
addressable-setters 5 183 5 186 50 229 50 238
addressable-to-s 5 162 5 171 50 182 50 199
binarytrees 5 82 5 86 50 136 50 146
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 150 50 119 50 152
etanni 5 97 5 73 50 71 50 40
fannkuchredux 5 54 5 57 50 102 50 106
fluentd 5 56 5 66 50 19 50 26
graphql 5 372 5 469 50 572 50 914
graphql-native 5 56 5 88 50 22 50 68
knucleotide 5 163 5 159 50 117 50 113
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 98
nbody 5 246 5 302 50 679 50 661
nqueens 5 116 5 127 50 556 50 576
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 178 50 706 50 787
protoboeuf-encode 5 195 5 205 50 834 50 845
rack 5 440 5 454 50 717 50 730
ruby-json 5 84 5 100 50 50 50 74
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 169
tinygql 5 41 5 43 50 40 50 49
30k_ifelse 5 28 5 28 50 185 50 183
30k_methods 5 38 5 40 50 451 50 458
attr_accessor 5 157 5 201 50 1835 50 1924
cfunc_itself 5 348 5 358 50 1255 50 1259
fib 5 124 5 145 50 939 50 940
getivar 5 217 5 297 50 2316 50 2410
getivar-module 5 104 5 132 50 90 50 265
keyword_args 5 100 5 98 50 1240 50 1243
loops-times 5 23 5 25 50 64 50 62
object-new 5 268 5 385 50 296 50 769
respond_to 5 139 5 134 50 3888 50 3898
ruby-xor 5 236 5 253 50 1313 50 1281
send_bmethod 5 116 5 125 50 5538 50 4526
send_cfunc_block 5 106 5 104 50 353 50 344
send_rubyfunc_block 5 250 5 251 50 6925 50 6921
setivar 5 359 5 481 50 4923 50 5043
setivar_object 5 341 5 304 50 751 50 642
setivar_young 5 341 5 307 50 799 50 662
str_concat 5 390 5 453 50 1201 50 1189
structaref 5 157 5 197 50 1811 50 1892
structaset 5 201 5 248 50 397 50 496
throw 5 1089 5 1346 50 1413 50 1650

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) 1544751 1306636 203 2626 0 0% 0 0 75.887375
chunky-png (click) 320882 296160 79 1374 1 0% 0 0 39.257885
erubi-rails (click) 1364312 1140335 268 3615 22 0% 0 0 96.292937
hexapdf (click) 1525321 1316532 594 15705 44 0% 0 0 439.469408
liquid-c (click) 558017 514116 114 2231 5 0% 0 0 60.260563
liquid-compile (click) 476280 394833 146 2704 2 0% 0 0 79.459813
liquid-render (click) 664419 588585 131 2950 8 0% 0 0 80.390402
lobsters (click) 8684284 7351687 3123 64038 119 0% 0 0 2120.910079
mail (click) 866011 851710 345 7700 40 0% 0 0 212.704367
psych-load (click) 288093 249195 61 829 2 0% 0 0 24.358125
railsbench (click) 3353341 2849017 1591 19774 97 0% 0 0 555.591956
rubocop (click) 5765616 4979622 3002 56924 125 0% 6 0 1664.646439
ruby-lsp (click) 1039566 859731 409 7421 47 0% 1 0 206.195348
sequel (click) 502538 397920 11 119 0 0% 0 0 3.953469
shipit (click) 7255814 6208509 3380 53693 169 0% 1 0 1846.956671
addressable-equality (click) 318660 295432 44 1414 1 0% 0 0 35.196294
addressable-getters (click) 277259 244258 26 863 0 0% 0 0 20.996648
addressable-join (click) 278943 272923 24 941 0 0% 0 0 23.574053
addressable-merge (click) 282806 247285 27 896 0 0% 0 0 22.305066
addressable-new (click) 257539 228270 21 563 0 0% 0 0 14.051386
addressable-normalize (click) 312767 272354 43 1332 1 0% 0 0 33.021489
addressable-parse (click) 279976 246133 26 880 0 0% 0 0 21.702447
addressable-setters (click) 257895 222570 20 584 0 0% 0 0 14.776346
addressable-to-s (click) 276952 202358 26 853 0 0% 0 0 20.807509
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.800845
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.143897
erubi (click) 247634 214568 6 132 0 0% 0 0 3.906578
etanni (click) 32382 26816 8 111 0 0% 0 0 3.4666
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.038921
fluentd (click) 486015 444143 7 115 0 0% 0 0 3.757148
graphql (click) 405278 371281 73 1895 19 1% 0 0 53.781974
graphql-native (click) 339927 327097 39 532 0 0% 0 0 14.067323
knucleotide (click) 9663 10633 7 107 0 0% 0 0 5.02219
lee (click) 318377 288548 49 1088 0 0% 0 0 31.390437
matmul (click) 11103 4709 8 136 0 0% 0 0 4.206104
nbody (click) 14448 21176 6 251 0 0% 0 0 6.152047
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.396247
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.703025
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.203495
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.502531
rack (click) 282309 251570 35 627 0 0% 0 0 16.406555
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.705136
rubyboy (click) 704467 622628 154 6869 42 0% 0 0 167.276551
rubykon (click) 148982 149243 138 2107 4 0% 0 0 57.223128
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.179132
tinygql (click) 300120 238282 59 1025 5 0% 0 0 27.506098
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1963.312812
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.95239
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.098603
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.542435
fib (click) 2659 2995 3 30 0 0% 0 0 1.138392
getivar (click) 3789 6778 3 79 0 0% 0 0 1.898773
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.329392
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818816
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.929736
object-new (click) 2406 2818 2 36 0 0% 0 0 1.056355
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.15008
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.792139
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.819521
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.120983
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.469496
setivar (click) 2783 3726 3 46 0 0% 0 0 1.255365
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.417917
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.707323
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.429052
structaref (click) 4407 9095 3 88 0 0% 0 0 2.344635
structaset (click) 4113 5834 3 70 0 0% 0 0 1.79386
throw (click) 5953 4624 5 53 0 0% 0 0 1.791972

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.