Ruby Benchmarks

Details for Benchmarks at 2026-02-03 00:53:05 UTC

YJIT metrics from the ruby-bench suite using Ruby 99d90125c0.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 95.5% faster than CRuby 4.1.0dev
  • 5.9% faster than YJIT 3.4.7
On railsbench it is
  • 118.4% faster than CRuby 4.1.0dev
  • 12.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 9 minutes
aarch64 runtime: 7 hours, 3 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 90 5 97 50 193 50 223
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 423 5 428 50 623 50 645
liquid-compile 5 418 5 467 50 581 50 739
liquid-render 5 172 5 174 50 433 50 450
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 192 50 253 50 267
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 159 50 247 50 256
ruby-lsp 5 155 5 163 50 231 50 232
sequel 5 422 5 432 50 599 50 627
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 163 5 174 50 184 50 202
addressable-join 5 73 5 76 50 66 50 71
addressable-merge 5 159 5 159 50 222 50 225
addressable-new 5 352 5 359 50 528 50 535
addressable-normalize 5 53 5 54 50 59 50 61
addressable-parse 5 103 5 106 50 104 50 111
addressable-setters 5 184 5 188 50 229 50 239
addressable-to-s 5 162 5 170 50 183 50 203
binarytrees 5 82 5 88 50 136 50 146
blurhash 5 83 5 87 50 143 50 145
erubi 5 135 5 150 50 125 50 156
etanni 5 98 5 73 50 71 50 39
fannkuchredux 5 55 5 57 50 102 50 107
fluentd 5 56 5 65 50 22 50 32
graphql 5 370 5 463 50 569 50 909
graphql-native 5 59 5 88 50 22 50 71
knucleotide 5 163 5 160 50 118 50 114
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 57 50 94 50 98
nbody 5 246 5 303 50 676 50 659
nqueens 5 116 5 127 50 556 50 574
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 179 50 707 50 765
protoboeuf-encode 5 198 5 206 50 830 50 836
rack 5 439 5 457 50 707 50 725
ruby-json 5 84 5 101 50 46 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 40 5 44 50 37 50 49
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 453 50 454
attr_accessor 5 157 5 200 50 1833 50 1926
cfunc_itself 5 349 5 358 50 1255 50 1259
fib 5 124 5 147 50 939 50 939
getivar 5 217 5 299 50 2313 50 2409
getivar-module 5 104 5 131 50 90 50 266
keyword_args 5 100 5 98 50 1240 50 1243
loops-times 5 23 5 25 50 63 50 63
object-new 5 268 5 386 50 298 50 769
respond_to 5 139 5 138 50 3888 50 3904
ruby-xor 5 236 5 254 50 1314 50 1282
send_bmethod 5 117 5 125 50 5538 50 4526
send_cfunc_block 5 105 5 105 50 353 50 339
send_rubyfunc_block 5 250 5 254 50 6921 50 6923
setivar 5 359 5 480 50 4923 50 5044
setivar_object 5 341 5 304 50 752 50 643
setivar_young 5 341 5 307 50 800 50 662
str_concat 5 391 5 452 50 1199 50 1162
structaref 5 157 5 196 50 1814 50 1892
structaset 5 201 5 248 50 395 50 496
throw 5 1086 5 1341 50 1424 50 1640

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) 1545623 1331865 203 2634 0 0% 0 0 75.737814
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 38.962364
erubi-rails (click) 1365553 1141998 268 3641 22 0% 0 0 97.634764
hexapdf (click) 1511933 1285014 593 15701 44 0% 0 0 441.360957
liquid-c (click) 557282 472563 114 2231 5 0% 0 0 59.911957
liquid-compile (click) 481930 459026 146 2742 2 0% 0 0 80.459524
liquid-render (click) 664463 596786 131 2950 8 0% 0 0 80.046535
lobsters (click) 8678064 7333467 3125 63909 117 0% 0 0 2134.504152
mail (click) 865636 810435 345 7700 40 0% 0 0 213.038852
psych-load (click) 287997 265440 61 829 2 0% 0 0 23.773591
railsbench (click) 3348989 2901234 1591 19757 97 0% 0 0 553.962134
rubocop (click) 5770214 4992046 3002 56970 126 0% 6 0 1697.711171
ruby-lsp (click) 1031461 891611 408 7407 46 0% 1 0 205.56436
sequel (click) 502485 414612 11 119 0 0% 0 0 3.878069
shipit (click) 7122225 6058014 3298 52041 169 0% 0 0 1736.249461
addressable-equality (click) 316711 252310 44 1386 1 0% 0 0 34.508101
addressable-getters (click) 276593 227479 26 863 0 0% 0 0 21.003048
addressable-join (click) 269528 262618 24 941 0 0% 0 0 23.500757
addressable-merge (click) 269552 265171 27 896 0 0% 0 0 22.350211
addressable-new (click) 244256 221619 21 565 0 0% 0 0 14.408952
addressable-normalize (click) 313035 289228 43 1345 1 0% 0 0 33.552261
addressable-parse (click) 281666 221960 26 880 0 0% 0 0 21.557693
addressable-setters (click) 259380 214541 20 582 0 0% 0 0 14.427539
addressable-to-s (click) 276911 218685 26 849 0 0% 0 0 20.748931
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.798355
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.220891
erubi (click) 247678 230981 6 132 0 0% 0 0 3.891908
etanni (click) 32382 26816 8 111 0 0% 0 0 3.468748
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.051939
fluentd (click) 485640 460212 7 115 0 0% 0 0 3.694277
graphql (click) 407806 350300 73 1895 19 1% 0 0 53.564984
graphql-native (click) 352277 308632 39 532 0 0% 0 0 14.26032
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.890323
lee (click) 316403 294786 49 1091 0 0% 0 0 31.57766
matmul (click) 11103 4709 8 136 0 0% 0 0 4.206754
nbody (click) 14448 21176 6 251 0 0% 0 0 6.200266
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.410402
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.585676
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.265303
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.45901
rack (click) 270893 228765 35 580 0 0% 0 0 15.331402
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.719205
rubyboy (click) 706201 632644 154 6875 42 0% 0 0 168.373788
rubykon (click) 150359 159173 138 2126 4 0% 0 0 57.402635
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.249577
tinygql (click) 298771 253525 59 1031 5 0% 0 0 27.289805
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1962.496037
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.714744
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.088642
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.493944
fib (click) 2659 2995 3 30 0 0% 0 0 1.157301
getivar (click) 3789 6778 3 79 0 0% 0 0 1.934232
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.335397
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.796286
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.928807
object-new (click) 2406 2818 2 36 0 0% 0 0 1.06784
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.145401
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.804501
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.827827
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.118409
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.475802
setivar (click) 2783 3726 3 46 0 0% 0 0 1.249053
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.452484
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.726861
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.450093
structaref (click) 4407 9095 3 88 0 0% 0 0 2.361047
structaset (click) 4113 5834 3 70 0 0% 0 0 1.763926
throw (click) 5953 4624 5 53 0 0% 0 0 1.752187

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.