Ruby Benchmarks

Details for Benchmarks at 2026-09-18 01:02:09 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 98.4% faster than CRuby 4.1.0dev
  • 8.4% faster than YJIT 3.4.7
On railsbench it is
  • 115.5% faster than CRuby 4.1.0dev
  • 16.3% faster than YJIT 3.4.7
x86_64 runtime: 9 hours, 56 minutes
aarch64 runtime: 8 hours, 27 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 96 50 207 50 222
chunky-png 5 32 5 34 50 33 50 32
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 449 50 619 50 679
liquid-compile 5 421 5 525 50 664 50 852
liquid-il 5 67 5 70 50 116 50 131
liquid-render 5 169 5 173 50 412 50 472
lobsters 5 20 5 21 50 10 50 10
mail 5 193 5 213 50 254 50 300
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 247 50 259
ruby-lsp 5 157 5 167 50 240 50 239
sequel 5 428 5 460 50 599 50 652
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 26 5 30 50 12 50 18
addressable-getters 5 165 5 176 50 183 50 214
addressable-join 5 75 5 87 50 66 50 84
addressable-merge 5 161 5 165 50 222 50 245
addressable-new 5 352 5 362 50 520 50 550
addressable-normalize 5 52 5 58 50 61 50 70
addressable-parse 5 104 5 109 50 104 50 125
addressable-setters 5 184 5 195 50 234 50 264
addressable-to-s 5 164 5 176 50 182 50 213
binarytrees 5 82 5 91 50 136 50 171
blurhash 5 84 5 85 50 145 50 144
erubi 5 137 5 152 50 141 50 157
etanni 5 100 5 80 50 72 50 47
fannkuchredux 5 55 5 55 50 100 50 108
fluentd 5 62 5 67 50 20 50 47
gcbench 5 10 5 11 50 10 50 16
grape 5 27 5 30 50 15 50 29
graphql 5 372 5 465 50 568 50 986
graphql-native 5 59 5 88 50 20 50 69
knucleotide 5 163 5 154 50 117 50 107
lee 5 23 5 33 50 10 50 23
matmul 5 53 5 56 50 88 50 98
nbody 5 250 5 279 50 662 50 641
nqueens 5 119 5 118 50 554 50 591
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 191 50 696 50 804
protoboeuf-encode 5 201 5 202 50 791 50 815
rack 5 444 5 453 50 719 50 741
ruby-json 5 84 5 113 50 50 50 89
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
splay 5 209 5 223 50 246 50 278
string_malloc_pressure 5 144 5 32 50 101 50 10
sudoku 5 48 5 50 50 155 50 165
tinygql 5 41 5 45 50 40 50 57
30k_ifelse 5 28 5 29 50 185 50 184
30k_methods 5 38 5 40 50 453 50 456
30k_variables 5 20 5 23 50 10 50 10
attr_accessor 5 156 5 203 50 1833 50 1925
block_methods 5 10 5 10 50 10 50 10
cfunc_itself 5 349 5 323 50 1255 50 1258
fib 5 125 5 147 50 911 50 939
getivar 5 210 5 319 50 2305 50 2427
getivar-module 5 103 5 132 50 88 50 147
keyword_args 5 102 5 111 50 1240 50 1243
loops-times 5 23 5 27 50 63 50 62
object-new 5 268 5 667 50 298 50 1567
object-new-initialize 5 168 5 271 50 259 50 1028
object-new-no-escape 5 81 5 150 50 89 50 543
respond_to 5 139 5 128 50 3908 50 3905
ruby-xor 5 247 5 255 50 1306 50 1305
send_bmethod 5 118 5 117 50 5539 50 4527
send_cfunc_block 5 106 5 105 50 306 50 294
send_rubyfunc_block 5 196 5 194 50 1372 50 1374
send_rubyfunc_inline 5 30 5 37 50 297 50 298
setivar 5 359 5 350 50 4930 50 4925
setivar_object 5 341 5 287 50 764 50 781
setivar_young 5 342 5 287 50 808 50 812
str_concat 5 391 5 424 50 1195 50 927
struct-new-no-escape 5 148 5 209 50 151 50 326
structaref 5 153 5 196 50 1801 50 1887
structaset 5 198 5 276 50 369 50 2662
throw 5 1110 5 1345 50 1438 50 1733

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) 1580021 1361335 204 2673 0 0% 0 0 77.605166
chunky-png (click) 332524 294373 79 1378 1 0% 0 0 37.887018
erubi-rails (click) 1395955 1226250 268 3636 23 0% 0 0 93.907848
hexapdf (click) 1535345 1321685 593 15773 45 0% 0 0 421.537286
liquid-c (click) 570170 553699 113 2235 5 0% 0 0 62.117571
liquid-compile (click) 486409 416358 146 2677 2 0% 0 0 72.817286
liquid-il (click) 622516 546858 70 2733 0 0% 0 0 79.617643
liquid-render (click) 676407 603338 130 2957 8 0% 0 0 77.026281
lobsters (click) 8549804 7246512 3127 63430 125 0% 0 0 2026.45249
mail (click) 880216 870754 345 7750 40 0% 0 0 205.795083
psych-load (click) 297793 262972 60 836 2 0% 0 0 23.382776
railsbench (click) 3403822 2960393 1591 19815 105 0% 0 0 568.37988
rubocop (click) 5770909 5006173 3000 57135 133 0% 6 0 1612.040558
ruby-lsp (click) 1060738 956391 407 7470 46 0% 1 0 198.186368
sequel (click) 523449 455765 11 119 0 0% 0 0 4.327834
shipit (click) 6911234 5773840 3136 50481 147 0% 0 0 1600.412474
addressable-equality (click) 333912 288991 44 1382 1 0% 0 0 33.161593
addressable-getters (click) 292755 262587 26 863 0 0% 0 0 20.096915
addressable-join (click) 298192 262984 24 941 0 0% 0 0 23.009799
addressable-merge (click) 300019 235052 27 896 0 0% 0 0 21.600958
addressable-new (click) 274855 216192 21 564 0 0% 0 0 13.785796
addressable-normalize (click) 329265 283979 43 1328 1 0% 0 0 31.56485
addressable-parse (click) 297213 217592 26 880 0 0% 0 0 21.060318
addressable-setters (click) 275045 210265 20 582 0 0% 0 0 14.312345
addressable-to-s (click) 293830 230832 26 849 0 0% 0 0 20.1237
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.721795
blurhash (click) 52211 43340 27 606 0 0% 0 0 17.866731
erubi (click) 256290 241235 6 135 0 0% 0 0 3.925292
etanni (click) 29821 22968 8 114 0 0% 0 0 3.430919
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 10.809148
fluentd (click) 528352 478432 7 116 0 0% 0 0 3.590837
gcbench (click) 15503 8804 9 111 0 0% 0 0 3.419746
grape (click) 771303 677961 89 1021 0 0% 0 0 25.326467
graphql (click) 426657 371331 74 1944 18 0% 0 0 52.749954
graphql-native (click) 369969 287488 39 532 0 0% 0 0 13.476287
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.613688
lee (click) 328317 267653 50 1107 0 0% 0 0 30.228651
matmul (click) 11076 4720 8 137 0 0% 0 0 4.070524
nbody (click) 14448 21176 6 251 0 0% 0 0 6.101538
nqueens (click) 22523 12434 5 390 0 0% 0 0 10.146241
optcarrot (click) 321902 302848 188 4600 34 0% 0 0 106.21841
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 70.940082
protoboeuf-encode (click) 242247 233890 14 1820 0 0% 0 0 42.144715
rack (click) 295561 291792 35 581 0 0% 0 0 14.917637
ruby-json (click) 19822 17829 8 211 0 0% 0 0 5.805153
rubyboy (click) 677451 634350 154 6525 42 0% 0 0 161.877391
rubykon (click) 146467 153511 137 2080 3 0% 0 0 54.541858
splay (click) 34536 22516 9 175 0 0% 0 0 5.201016
string_malloc_pressure (click) 4044 3947 6 50 0 0% 0 0 1.73681
sudoku (click) 51585 74062 7 873 0 0% 0 0 22.826118
tinygql (click) 308135 257637 59 1041 5 0% 0 0 26.18525
30k_ifelse (click) 6265365 5037717 9260 76309 0 0% 0 0 1852.570432
30k_methods (click) 2278060 1643077 5780 19371 0 0% 0 0 472.167277
30k_variables (click) 8388846 23773775 302 188140 0 0% 0 0 4943.086354
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.057263
block_methods (click) 25722 18873 26 310 0 0% 0 0 8.666766
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.540031
fib (click) 2659 2995 3 30 0 0% 0 0 1.080711
getivar (click) 3789 6778 3 79 0 0% 0 0 1.885395
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.322941
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.802974
loops-times (click) 7066 8398 5 100 0 0% 0 0 2.907143
object-new (click) 2352 2825 2 38 0 0% 0 0 1.006201
object-new-initialize (click) 2988 3280 4 44 0 0% 0 0 1.293318
object-new-no-escape (click) 4240 4697 5 64 0 0% 0 0 1.733872
respond_to (click) 6370 6822 4 81 0 0% 0 0 2.121992
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.814354
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.796622
send_cfunc_block (click) 8981 6196 4 120 0 0% 0 0 2.302312
send_rubyfunc_block (click) 5649 4645 5 71 0 0% 0 0 1.747422
send_rubyfunc_inline (click) 5654 403 2 35 0 0% 0 0 1.056192
setivar (click) 2783 3726 3 46 0 0% 0 0 1.275923
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.393904
setivar_young (click) 4273 4878 4 64 0 0% 0 0 1.728854
str_concat (click) 5772 6980 6 83 0 0% 0 0 2.505671
struct-new-no-escape (click) 2828 3378 3 43 0 0% 0 0 1.260079
structaref (click) 4407 9095 3 88 0 0% 0 0 2.319596
structaset (click) 3693 5870 3 66 0 0% 0 0 1.6677
throw (click) 5953 4624 5 53 0 0% 0 0 1.772068

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.