Ruby Benchmarks

Details for Benchmarks at 2026-02-05 00:52:50 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.5% faster than CRuby 4.1.0dev
  • 7.2% faster than YJIT 3.4.7
On railsbench it is
  • 119.7% faster than CRuby 4.1.0dev
  • 12.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 8 minutes
aarch64 runtime: 7 hours, 1 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 190 50 237
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 422 5 433 50 628 50 642
liquid-compile 5 417 5 482 50 548 50 720
liquid-render 5 171 5 172 50 435 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 194 50 253 50 270
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 246 50 256
ruby-lsp 5 157 5 163 50 219 50 235
sequel 5 425 5 432 50 599 50 625
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 13
addressable-getters 5 163 5 172 50 184 50 200
addressable-join 5 71 5 76 50 66 50 73
addressable-merge 5 160 5 160 50 222 50 223
addressable-new 5 351 5 360 50 526 50 539
addressable-normalize 5 53 5 54 50 60 50 61
addressable-parse 5 103 5 106 50 104 50 112
addressable-setters 5 185 5 187 50 228 50 237
addressable-to-s 5 164 5 171 50 183 50 198
binarytrees 5 82 5 86 50 135 50 149
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 152 50 133 50 151
etanni 5 97 5 73 50 71 50 40
fannkuchredux 5 55 5 57 50 102 50 106
fluentd 5 56 5 66 50 20 50 30
graphql 5 369 5 465 50 574 50 937
graphql-native 5 59 5 88 50 22 50 69
knucleotide 5 163 5 159 50 118 50 113
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 94 50 98
nbody 5 246 5 294 50 676 50 662
nqueens 5 116 5 127 50 556 50 576
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 178 50 707 50 787
protoboeuf-encode 5 197 5 205 50 835 50 842
rack 5 441 5 458 50 705 50 742
ruby-json 5 82 5 100 50 50 50 72
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 169
tinygql 5 41 5 43 50 39 50 49
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 38 5 41 50 457 50 450
attr_accessor 5 157 5 200 50 1833 50 1925
cfunc_itself 5 350 5 359 50 1255 50 1259
fib 5 123 5 148 50 939 50 939
getivar 5 218 5 298 50 2318 50 2408
getivar-module 5 104 5 132 50 90 50 265
keyword_args 5 100 5 98 50 1240 50 1242
loops-times 5 23 5 25 50 64 50 62
object-new 5 268 5 384 50 299 50 767
respond_to 5 138 5 134 50 3892 50 3899
ruby-xor 5 237 5 253 50 1313 50 1282
send_bmethod 5 117 5 124 50 5539 50 4526
send_cfunc_block 5 105 5 104 50 352 50 343
send_rubyfunc_block 5 249 5 253 50 6924 50 6921
setivar 5 359 5 480 50 4922 50 5043
setivar_object 5 341 5 304 50 714 50 642
setivar_young 5 341 5 307 50 798 50 661
str_concat 5 390 5 453 50 1202 50 1196
structaref 5 156 5 196 50 1813 50 1890
structaset 5 201 5 248 50 396 50 497
throw 5 1089 5 1350 50 1413 50 1639

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) 1544582 1339187 203 2626 0 0% 0 0 75.4813
chunky-png (click) 320647 304153 79 1374 1 0% 0 0 38.956187
erubi-rails (click) 1367598 1144076 269 3626 22 0% 0 0 96.671514
hexapdf (click) 1524622 1332135 594 15699 44 0% 0 0 437.51935
liquid-c (click) 559272 548160 114 2231 5 0% 0 0 59.709031
liquid-compile (click) 482153 459282 146 2738 2 0% 0 0 79.155236
liquid-render (click) 664689 597061 131 2950 8 0% 0 0 79.659232
lobsters (click) 8676527 7360503 3124 63935 117 0% 0 0 2111.976377
mail (click) 865917 859723 345 7700 40 0% 0 0 213.552582
psych-load (click) 288093 249195 61 829 2 0% 0 0 24.014993
railsbench (click) 3349796 2932996 1591 19764 97 0% 0 0 555.34887
rubocop (click) 5768575 5039821 3002 56950 126 0% 6 0 1670.429126
ruby-lsp (click) 1039475 876172 408 7395 46 0% 1 0 204.124298
sequel (click) 502163 389393 11 119 0 0% 0 0 4.010492
shipit (click) 7462272 6262245 3284 52212 179 0% 0 0 1720.30409
addressable-equality (click) 316879 268629 44 1379 1 0% 0 0 34.199405
addressable-getters (click) 277303 244307 26 863 0 0% 0 0 20.720904
addressable-join (click) 282677 220032 24 941 0 0% 0 0 23.124858
addressable-merge (click) 282869 255549 27 898 0 0% 0 0 22.441889
addressable-new (click) 258064 228815 21 569 0 0% 0 0 14.31866
addressable-normalize (click) 312622 272057 43 1328 1 0% 0 0 32.848084
addressable-parse (click) 280118 238109 26 880 0 0% 0 0 21.549579
addressable-setters (click) 244285 215492 20 582 0 0% 0 0 14.568001
addressable-to-s (click) 276339 267433 26 849 0 0% 0 0 20.785655
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.816487
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.194988
erubi (click) 247495 214508 6 132 0 0% 0 0 3.893143
etanni (click) 32837 27420 8 111 0 0% 0 0 3.476628
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.105706
fluentd (click) 486015 444042 7 115 0 0% 0 0 3.703364
graphql (click) 410087 375611 73 1895 19 1% 0 0 53.547697
graphql-native (click) 353042 325590 39 532 0 0% 0 0 14.293048
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.92198
lee (click) 316891 287021 49 1088 0 0% 0 0 31.449813
matmul (click) 11103 4709 8 136 0 0% 0 0 4.21562
nbody (click) 14448 21176 6 251 0 0% 0 0 6.15606
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.339713
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.57923
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.297759
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.22135
rack (click) 280463 256218 35 585 0 0% 0 0 15.47656
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.701685
rubyboy (click) 704526 663708 154 6871 42 0% 0 0 167.48266
rubykon (click) 150602 167618 138 2128 4 0% 0 0 57.324971
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.183061
tinygql (click) 300414 246768 59 1031 5 0% 0 0 27.33334
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1949.596481
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.040845
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.069315
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.504822
fib (click) 2659 2995 3 30 0 0% 0 0 1.120557
getivar (click) 3789 6778 3 79 0 0% 0 0 1.953529
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.321398
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.823712
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.944182
object-new (click) 2406 2818 2 36 0 0% 0 0 1.061859
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.172497
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.775353
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.816184
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.146909
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.491665
setivar (click) 2783 3726 3 46 0 0% 0 0 1.246152
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.427632
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.703475
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.448197
structaref (click) 4407 9095 3 88 0 0% 0 0 2.347846
structaset (click) 4113 5834 3 70 0 0% 0 0 1.803789
throw (click) 5953 4624 5 53 0 0% 0 0 1.833802

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.