Ruby Benchmarks

Details for Benchmarks at 2026-09-09 01:01:59 UTC

YJIT metrics from the ruby-bench suite using Ruby 2e9c99d544.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.4% faster than CRuby 4.1.0dev
  • 8.3% faster than YJIT 3.4.7
On railsbench it is
  • 113.2% faster than CRuby 4.1.0dev
  • 14.1% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 21 minutes
aarch64 runtime: 7 hours, 59 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 92 5 95 50 200 50 213
chunky-png 5 32 5 33 50 33 50 27
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 445 50 617 50 683
liquid-compile 5 418 5 517 50 582 50 844
liquid-il 5 66 5 69 50 116 50 131
liquid-render 5 172 5 174 50 432 50 472
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 213 50 253 50 292
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 162 50 246 50 252
ruby-lsp 5 163 5 162 50 227 50 232
sequel 5 423 5 456 50 582 50 646
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 18
addressable-getters 5 164 5 174 50 183 50 215
addressable-join 5 75 5 86 50 65 50 85
addressable-merge 5 160 5 162 50 222 50 251
addressable-new 5 352 5 354 50 518 50 548
addressable-normalize 5 52 5 58 50 60 50 72
addressable-parse 5 104 5 110 50 104 50 123
addressable-setters 5 185 5 195 50 233 50 263
addressable-to-s 5 165 5 175 50 182 50 214
binarytrees 5 82 5 90 50 136 50 167
blurhash 5 84 5 85 50 145 50 145
erubi 5 134 5 153 50 139 50 154
etanni 5 99 5 81 50 71 50 48
fannkuchredux 5 55 5 57 50 101 50 108
fluentd 5 60 5 63 50 30 50 29
gcbench 5 10 5 11 50 10 50 16
grape 5 26 5 30 50 15 50 28
graphql 5 370 5 457 50 569 50 958
graphql-native 5 58 5 89 50 21 50 71
knucleotide 5 163 5 149 50 117 50 102
lee 5 23 5 33 50 10 50 21
matmul 5 53 5 52 50 87 50 87
nbody 5 250 5 251 50 663 50 644
nqueens 5 119 5 125 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 185 50 696 50 822
protoboeuf-encode 5 200 5 199 50 789 50 812
rack 5 440 5 456 50 714 50 736
ruby-json 5 84 5 112 50 50 50 87
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 225 50 246 50 269
string_malloc_pressure 5 149 5 32 50 102 50 10
sudoku 5 48 5 50 50 155 50 164
tinygql 5 42 5 43 50 36 50 57
30k_ifelse 5 28 5 28 50 185 50 185
30k_methods 5 38 5 39 50 453 50 458
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 156 5 202 50 1834 50 1926
cfunc_itself 5 346 5 361 50 1255 50 1258
fib 5 125 5 138 50 939 50 939
getivar 5 210 5 325 50 2306 50 2432
getivar-module 5 103 5 145 50 89 50 117
keyword_args 5 103 5 108 50 1239 50 1243
loops-times 5 23 5 26 50 62 50 62
object-new 5 268 5 662 50 298 50 1537
object-new-initialize 5 169 5 264 50 259 50 1017
object-new-no-escape 5 81 5 150 50 89 50 540
respond_to 5 139 5 127 50 3906 50 3907
ruby-xor 5 247 5 249 50 1305 50 1309
send_bmethod 5 118 5 123 50 5539 50 4526
send_cfunc_block 5 107 5 110 50 304 50 281
send_rubyfunc_block 5 196 5 214 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 298 50 297
setivar 5 359 5 347 50 4929 50 4921
setivar_object 5 341 5 286 50 765 50 783
setivar_young 5 341 5 286 50 808 50 809
str_concat 5 391 5 428 50 1199 50 924
structaref 5 153 5 198 50 1802 50 1891
structaset 5 199 5 246 50 370 50 485
throw 5 1110 5 1393 50 1445 50 1887

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) 1579630 1287870 204 2677 0 0% 0 0 78.736915
chunky-png (click) 331819 302480 79 1378 1 0% 0 0 38.179054
erubi-rails (click) 1395542 1234572 268 3636 23 0% 0 0 94.644294
hexapdf (click) 1533430 1287217 593 15773 45 0% 0 0 424.416881
liquid-c (click) 568548 519531 113 2235 5 0% 0 0 61.53616
liquid-compile (click) 485704 449041 146 2677 2 0% 0 0 73.564896
liquid-il (click) 620766 520902 70 2731 0 0% 0 0 79.704177
liquid-render (click) 675697 611445 130 2957 8 0% 0 0 77.252042
lobsters (click) 8558838 7174301 3126 63546 125 0% 0 0 2032.765649
mail (click) 877184 819169 345 7750 40 0% 0 0 207.500054
psych-load (click) 286942 226414 60 836 2 0% 0 0 23.152152
railsbench (click) 3406024 2996890 1591 19815 105 0% 0 0 570.227029
rubocop (click) 5770211 5006071 3000 57135 133 0% 6 0 1613.465288
ruby-lsp (click) 1059786 979949 408 7484 47 0% 1 0 198.924316
sequel (click) 530618 442702 11 119 0 0% 0 0 4.594118
shipit (click) 6917011 5885475 3136 50440 147 0% 0 0 1605.504953
addressable-equality (click) 332290 287616 44 1382 1 0% 0 0 33.56616
addressable-getters (click) 293791 264769 26 863 0 0% 0 0 20.567399
addressable-join (click) 289356 245193 24 941 0 0% 0 0 23.043985
addressable-merge (click) 296081 296709 27 896 0 0% 0 0 21.72685
addressable-new (click) 272954 230973 21 564 0 0% 0 0 13.80531
addressable-normalize (click) 328834 316870 43 1328 1 0% 0 0 31.901173
addressable-parse (click) 295312 240565 26 880 0 0% 0 0 21.406826
addressable-setters (click) 274335 242928 20 582 0 0% 0 0 14.319061
addressable-to-s (click) 293399 247339 26 849 0 0% 0 0 20.204361
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.769541
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.870384
erubi (click) 255580 224746 6 135 0 0% 0 0 3.94501
etanni (click) 29821 22968 8 114 0 0% 0 0 3.445524
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.887431
fluentd (click) 517605 466246 7 116 0 0% 0 0 3.594828
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.446516
grape (click) 770870 727199 89 1021 0 0% 0 0 25.860643
graphql (click) 425035 378163 74 1944 18 0% 0 0 52.656947
graphql-native (click) 349974 288838 39 532 0 0% 0 0 13.612208
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.725916
lee (click) 327891 284160 50 1107 0 0% 0 0 30.215988
matmul (click) 11076 4720 8 137 0 0% 0 0 4.156323
nbody (click) 14448 21176 6 251 0 0% 0 0 6.174118
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.184516
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 106.506596
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.222229
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.190306
rack (click) 294856 258907 35 581 0 0% 0 0 15.135736
ruby-json (click) 19495 17440 8 211 0 0% 0 0 5.896966
rubyboy (click) 666599 581413 154 6525 42 0% 0 0 162.033774
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.20889
splay (click) 34536 22516 9 175 0 0% 0 0 5.214878
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.740982
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.749777
tinygql (click) 301072 266627 59 1041 5 0% 0 0 26.360144
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1864.762546
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 474.894592
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4974.096605
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.090038
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.497163
fib (click) 2659 2995 3 30 0 0% 0 0 1.104778
getivar (click) 3789 6778 3 79 0 0% 0 0 1.897962
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.334235
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.828835
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.937163
object-new (click) 2352 2825 2 38 0 0% 0 0 0.986483
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.296858
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.762354
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.096969
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.796212
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.791907
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.333913
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.759192
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.062895
setivar (click) 2783 3726 3 46 0 0% 0 0 1.254013
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.416013
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.74146
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.432589
structaref (click) 4407 9095 3 88 0 0% 0 0 2.360754
structaset (click) 4113 5834 3 70 0 0% 0 0 1.788606
throw (click) 5953 4624 5 53 0 0% 0 0 1.798105

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.