Ruby Benchmarks

Details for Benchmarks at 2026-09-07 01:06:21 UTC

YJIT metrics from the ruby-bench suite using Ruby 7a095da067.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 97.8% faster than CRuby 4.1.0dev
  • 8.3% faster than YJIT 3.4.7
On railsbench it is
  • 108.5% faster than CRuby 4.1.0dev
  • 13.8% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 14 minutes
aarch64 runtime: 7 hours, 53 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 96 50 193 50 218
chunky-png 5 32 5 32 50 34 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 446 50 618 50 678
liquid-compile 5 420 5 523 50 583 50 844
liquid-il 5 68 5 69 50 116 50 131
liquid-render 5 169 5 170 50 431 50 465
lobsters 5 20 5 21 50 10 50 10
mail 5 194 5 212 50 253 50 290
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 159 50 247 50 255
ruby-lsp 5 163 5 167 50 239 50 228
sequel 5 428 5 460 50 590 50 649
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 29 50 12 50 17
addressable-getters 5 164 5 178 50 184 50 215
addressable-join 5 75 5 86 50 66 50 85
addressable-merge 5 161 5 165 50 224 50 248
addressable-new 5 353 5 353 50 519 50 542
addressable-normalize 5 52 5 58 50 60 50 72
addressable-parse 5 104 5 109 50 103 50 123
addressable-setters 5 185 5 196 50 233 50 261
addressable-to-s 5 164 5 175 50 184 50 214
binarytrees 5 82 5 91 50 136 50 169
blurhash 5 84 5 86 50 145 50 143
erubi 5 140 5 147 50 141 50 150
etanni 5 101 5 78 50 72 50 45
fannkuchredux 5 55 5 57 50 101 50 111
fluentd 5 61 5 62 50 21 50 33
gcbench 5 10 5 11 50 10 50 16
graphql 5 368 5 470 50 569 50 987
graphql-native 5 58 5 88 50 21 50 67
knucleotide 5 163 5 151 50 118 50 104
lee 5 23 5 33 50 10 50 20
matmul 5 53 5 52 50 88 50 98
nbody 5 250 5 262 50 662 50 684
nqueens 5 119 5 126 50 554 50 592
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 189 50 696 50 782
protoboeuf-encode 5 201 5 207 50 794 50 795
rack 5 441 5 449 50 715 50 753
ruby-json 5 84 5 113 50 51 50 88
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 216 50 250 50 267
string_malloc_pressure 5 146 5 32 50 101 50 10
sudoku 5 48 5 49 50 155 50 162
tinygql 5 41 5 45 50 36 50 56
30k_ifelse 5 28 5 29 50 186 50 184
30k_methods 5 38 5 39 50 456 50 458
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 157 5 220 50 1813 50 1955
cfunc_itself 5 345 5 363 50 1255 50 1258
fib 5 125 5 142 50 939 50 939
getivar 5 210 5 324 50 2306 50 2427
getivar-module 5 103 5 142 50 88 50 113
keyword_args 5 102 5 102 50 1240 50 1243
loops-times 5 23 5 26 50 63 50 62
object-new 5 268 5 660 50 297 50 1565
object-new-initialize 5 169 5 272 50 259 50 1026
object-new-no-escape 5 81 5 150 50 89 50 543
respond_to 5 139 5 126 50 3905 50 3905
ruby-xor 5 247 5 255 50 1306 50 1314
send_bmethod 5 118 5 125 50 5538 50 4527
send_cfunc_block 5 107 5 112 50 305 50 305
send_rubyfunc_block 5 195 5 211 50 1372 50 1375
send_rubyfunc_inline 5 30 5 37 50 297 50 297
setivar 5 359 5 348 50 4930 50 4923
setivar_object 5 341 5 286 50 760 50 719
setivar_young 5 342 5 286 50 808 50 740
str_concat 5 391 5 423 50 1195 50 889
structaref 5 153 5 220 50 1797 50 1925
structaset 5 199 5 279 50 369 50 504
throw 5 1110 5 1317 50 1446 50 1684

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) 1580306 1288292 204 2684 0 0% 0 0 78.784431
chunky-png (click) 331819 286096 79 1378 1 0% 0 0 38.213826
erubi-rails (click) 1393953 1216238 268 3636 23 0% 0 0 94.434721
hexapdf (click) 1534439 1329545 593 15773 45 0% 0 0 425.949851
liquid-c (click) 569235 471200 113 2227 5 0% 0 0 61.434697
liquid-compile (click) 485801 432715 146 2677 2 0% 0 0 73.141988
liquid-il (click) 622301 514205 70 2735 0 0% 0 0 79.866876
liquid-render (click) 675472 610976 130 2949 8 0% 0 0 77.541555
lobsters (click) 8550894 7172456 3126 63434 125 0% 0 0 2020.147259
mail (click) 880785 905522 345 7750 40 0% 0 0 207.094347
psych-load (click) 286942 259182 60 836 2 0% 0 0 23.111088
railsbench (click) 3406090 2882232 1591 19816 105 0% 0 0 569.129235
rubocop (click) 5769551 5013431 3000 57127 133 0% 6 0 1612.03816
ruby-lsp (click) 1060696 964966 408 7484 47 0% 1 0 199.476427
sequel (click) 533181 478824 11 119 0 0% 0 0 4.04099
shipit (click) 6901520 5867009 3136 50459 147 0% 0 0 1602.775028
addressable-equality (click) 331256 278577 44 1382 1 0% 0 0 33.447882
addressable-getters (click) 293791 264769 26 863 0 0% 0 0 20.548701
addressable-join (click) 297003 246437 24 941 0 0% 0 0 22.869321
addressable-merge (click) 289533 272482 27 896 0 0% 0 0 21.313803
addressable-new (click) 273963 232301 21 564 0 0% 0 0 13.559566
addressable-normalize (click) 318698 305038 43 1328 1 0% 0 0 31.138974
addressable-parse (click) 296224 250027 26 880 0 0% 0 0 21.077441
addressable-setters (click) 274153 242758 20 582 0 0% 0 0 14.132634
addressable-to-s (click) 293217 238977 26 849 0 0% 0 0 20.203865
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.754524
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.838794
erubi (click) 255398 216384 6 135 0 0% 0 0 3.884272
etanni (click) 30039 31433 8 114 0 0% 0 0 3.397966
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.88067
fluentd (click) 517598 482662 7 116 0 0% 0 0 3.638044
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.452896
graphql (click) 425947 371221 74 1944 18 0% 0 0 52.620198
graphql-native (click) 369269 303767 39 532 0 0% 0 0 13.645878
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.721916
lee (click) 325666 322775 50 1107 0 0% 0 0 30.493397
matmul (click) 11076 4720 8 137 0 0% 0 0 4.12048
nbody (click) 14448 21176 6 251 0 0% 0 0 6.155239
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.289699
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 106.942113
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 71.270317
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.482685
rack (click) 294856 267099 35 581 0 0% 0 0 14.881847
ruby-json (click) 20040 18102 8 211 0 0% 0 0 5.929502
rubyboy (click) 676738 650609 154 6525 42 0% 0 0 163.492582
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.487914
splay (click) 34536 22516 9 175 0 0% 0 0 5.19305
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.759297
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.874153
tinygql (click) 291918 263550 59 1041 5 0% 0 0 26.370915
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1862.828076
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 475.332863
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4974.385234
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.122465
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.535833
fib (click) 2659 2995 3 30 0 0% 0 0 1.168767
getivar (click) 3789 6778 3 79 0 0% 0 0 1.935238
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.312203
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.80456
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.87726
object-new (click) 2352 2825 2 38 0 0% 0 0 0.999851
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.310277
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.748676
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.118282
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.818215
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.803328
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.338373
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.768842
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.057267
setivar (click) 2783 3726 3 46 0 0% 0 0 1.259052
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.408016
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.70693
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.405532
structaref (click) 4407 9095 3 88 0 0% 0 0 2.370077
structaset (click) 4113 5834 3 70 0 0% 0 0 1.779994
throw (click) 5953 4624 5 53 0 0% 0 0 1.77955

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.