Ruby Benchmarks

Details for Benchmarks at 2026-01-28 00:43:58 UTC

YJIT metrics from the ruby-bench suite using Ruby 5eb17ea4aa.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 96.2% faster than CRuby 4.1.0dev
  • 5.8% faster than YJIT 3.4.7
On railsbench it is
  • 119.6% faster than CRuby 4.1.0dev
  • 11.4% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 10 minutes
aarch64 runtime: 7 hours, 4 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 99 50 194 50 243
chunky-png 5 31 5 32 50 33 50 30
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 430 50 629 50 640
liquid-compile 5 416 5 472 50 585 50 730
liquid-render 5 171 5 173 50 437 50 440
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 160 50 248 50 255
ruby-lsp 5 159 5 162 50 230 50 234
sequel 5 425 5 427 50 600 50 598
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 11
addressable-getters 5 163 5 172 50 183 50 194
addressable-join 5 74 5 77 50 66 50 69
addressable-merge 5 160 5 159 50 222 50 221
addressable-new 5 355 5 355 50 524 50 522
addressable-normalize 5 53 5 54 50 59 50 59
addressable-parse 5 103 5 106 50 103 50 107
addressable-setters 5 183 5 182 50 230 50 231
addressable-to-s 5 163 5 170 50 183 50 194
binarytrees 5 82 5 86 50 136 50 145
blurhash 5 78 5 87 50 143 50 143
erubi 5 132 5 149 50 133 50 147
etanni 5 98 5 73 50 71 50 39
fannkuchredux 5 55 5 57 50 102 50 104
fluentd 5 56 5 62 50 22 50 30
graphql 5 371 5 465 50 569 50 919
graphql-native 5 58 5 87 50 20 50 68
knucleotide 5 163 5 161 50 117 50 115
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 95 50 95
nbody 5 246 5 282 50 674 50 673
nqueens 5 116 5 126 50 556 50 590
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 187 50 706 50 774
protoboeuf-encode 5 197 5 203 50 833 50 814
rack 5 443 5 454 50 708 50 726
ruby-json 5 82 5 99 50 50 50 71
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 49 50 156 50 163
tinygql 5 41 5 43 50 40 50 50
30k_ifelse 5 28 5 28 50 186 50 183
30k_methods 5 38 5 40 50 451 50 455
attr_accessor 5 157 5 216 50 1831 50 1947
cfunc_itself 5 348 5 351 50 1255 50 1259
fib 5 124 5 138 50 939 50 940
getivar 5 214 5 327 50 2315 50 2427
getivar-module 5 104 5 144 50 90 50 271
keyword_args 5 100 5 108 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 61
object-new 5 268 5 378 50 297 50 736
respond_to 5 139 5 139 50 3891 50 3898
ruby-xor 5 236 5 250 50 1313 50 1284
send_bmethod 5 117 5 122 50 5539 50 4527
send_cfunc_block 5 107 5 107 50 353 50 346
send_rubyfunc_block 5 246 5 252 50 6924 50 6928
setivar 5 359 5 480 50 4924 50 5042
setivar_object 5 341 5 298 50 751 50 539
setivar_young 5 342 5 301 50 797 50 557
str_concat 5 391 5 452 50 1201 50 1149
structaref 5 157 5 200 50 1809 50 1896
structaset 5 204 5 260 50 385 50 491
throw 5 1088 5 1327 50 1406 50 1658

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) 1545244 1281479 203 2644 0 0% 0 0 76.008695
chunky-png (click) 320399 279450 79 1374 1 0% 0 0 38.890578
erubi-rails (click) 1368033 1201622 268 3668 22 0% 0 0 98.450704
hexapdf (click) 1510140 1227353 594 15697 44 0% 0 0 439.210791
liquid-c (click) 560994 525468 114 2231 5 0% 0 0 59.985423
liquid-compile (click) 479195 423042 146 2700 2 0% 0 0 78.182985
liquid-render (click) 664686 605184 131 2950 8 0% 0 0 78.684574
lobsters (click) 8678852 7296180 3126 64023 117 0% 0 0 2114.24333
mail (click) 865871 827018 345 7700 40 0% 0 0 213.800367
psych-load (click) 287997 273632 61 829 2 0% 0 0 24.231691
railsbench (click) 3344091 2984851 1591 19684 97 0% 0 0 555.675113
rubocop (click) 5755994 4902369 3002 56843 125 0% 6 0 1663.214637
ruby-lsp (click) 1037758 882031 407 7369 46 0% 1 0 204.055085
sequel (click) 502020 414134 11 119 0 0% 0 0 3.886443
shipit (click) 7115226 6021325 3298 52019 169 0% 0 0 1718.749279
addressable-equality (click) 318390 278341 44 1398 1 0% 0 0 34.649401
addressable-getters (click) 277401 211658 26 863 0 0% 0 0 20.830808
addressable-join (click) 282152 252425 24 941 0 0% 0 0 23.404
addressable-merge (click) 282967 247496 27 898 0 0% 0 0 22.285737
addressable-new (click) 259007 230081 21 591 0 0% 0 0 14.791673
addressable-normalize (click) 312316 255555 43 1326 1 0% 0 0 32.657328
addressable-parse (click) 279589 254158 26 880 0 0% 0 0 21.572671
addressable-setters (click) 257832 214306 20 582 0 0% 0 0 14.473653
addressable-to-s (click) 276386 234694 26 849 0 0% 0 0 20.583155
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.798461
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.250479
erubi (click) 247634 190012 6 132 0 0% 0 0 3.892639
etanni (click) 32382 26816 8 111 0 0% 0 0 3.459485
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.076485
fluentd (click) 483506 440917 7 115 0 0% 0 0 3.740727
graphql (click) 408576 383602 73 1895 19 1% 0 0 53.634768
graphql-native (click) 352556 308860 39 532 0 0% 0 0 14.387513
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.87704
lee (click) 316847 286992 49 1088 0 0% 0 0 31.444519
matmul (click) 11103 4709 8 136 0 0% 0 0 4.229429
nbody (click) 14448 21176 6 251 0 0% 0 0 6.166587
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.36202
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.492554
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.252649
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.356396
rack (click) 282061 259635 35 627 0 0% 0 0 16.340096
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.789732
rubyboy (click) 704568 614580 154 6873 42 0% 0 0 168.05033
rubykon (click) 147478 130977 137 2088 3 0% 0 0 56.581495
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.127492
tinygql (click) 300262 254972 59 1031 5 0% 0 0 27.474032
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1954.069735
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.272274
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.086943
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.513159
fib (click) 2659 2995 3 30 0 0% 0 0 1.138121
getivar (click) 3789 6778 3 79 0 0% 0 0 1.914016
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.30613
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.831164
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.995259
object-new (click) 2406 2818 2 36 0 0% 0 0 1.054097
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.145076
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.810126
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.827261
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.127095
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.502872
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261023
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.43714
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.741294
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.436684
structaref (click) 4407 9095 3 88 0 0% 0 0 2.349612
structaset (click) 4113 5834 3 70 0 0% 0 0 1.784592
throw (click) 5953 4624 5 53 0 0% 0 0 1.746318

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.