Ruby Benchmarks

Details for Benchmarks at 2026-01-25 00:48:29 UTC

YJIT metrics from the ruby-bench suite using Ruby 985b58a4ed.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 93.2% faster than CRuby 4.1.0dev
  • 5.0% faster than YJIT 3.4.7
On railsbench it is
  • 116.5% 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, 5 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 98 50 189 50 232
chunky-png 5 32 5 32 50 32 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 425 50 625 50 621
liquid-compile 5 419 5 469 50 584 50 695
liquid-render 5 169 5 172 50 416 50 433
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 192 50 252 50 257
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 248 50 252
ruby-lsp 5 159 5 161 50 216 50 229
sequel 5 415 5 437 50 605 50 607
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 26 50 11 50 10
addressable-getters 5 163 5 165 50 184 50 186
addressable-join 5 73 5 76 50 66 50 67
addressable-merge 5 160 5 155 50 222 50 215
addressable-new 5 355 5 345 50 521 50 504
addressable-normalize 5 53 5 53 50 59 50 56
addressable-parse 5 103 5 102 50 104 50 104
addressable-setters 5 183 5 179 50 230 50 220
addressable-to-s 5 163 5 167 50 183 50 188
binarytrees 5 82 5 82 50 136 50 128
blurhash 5 83 5 88 50 143 50 145
erubi 5 130 5 142 50 138 50 143
etanni 5 97 5 69 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 107
fluentd 5 56 5 65 50 19 50 30
graphql 5 359 5 465 50 568 50 919
graphql-native 5 57 5 85 50 21 50 66
knucleotide 5 163 5 158 50 118 50 112
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 55 50 95 50 95
nbody 5 247 5 274 50 676 50 664
nqueens 5 116 5 125 50 556 50 574
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 185 50 706 50 749
protoboeuf-encode 5 196 5 204 50 830 50 804
rack 5 433 5 445 50 719 50 685
ruby-json 5 84 5 96 50 50 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 156 50 156
tinygql 5 41 5 43 50 36 50 47
30k_ifelse 5 28 5 28 50 185 50 184
30k_methods 5 38 5 41 50 458 50 455
attr_accessor 5 157 5 198 50 1836 50 1921
cfunc_itself 5 346 5 345 50 1255 50 1259
fib 5 124 5 145 50 939 50 939
getivar 5 217 5 324 50 2316 50 2430
getivar-module 5 104 5 139 50 90 50 268
keyword_args 5 100 5 107 50 1240 50 1243
loops-times 5 23 5 26 50 64 50 62
object-new 5 268 5 366 50 296 50 674
respond_to 5 139 5 139 50 3892 50 3901
ruby-xor 5 236 5 243 50 1314 50 1278
send_bmethod 5 116 5 123 50 5498 50 4527
send_cfunc_block 5 106 5 107 50 353 50 346
send_rubyfunc_block 5 250 5 251 50 6923 50 6930
setivar 5 359 5 481 50 4922 50 5045
setivar_object 5 341 5 301 50 752 50 637
setivar_young 5 341 5 304 50 795 50 658
str_concat 5 391 5 451 50 1201 50 1110
structaref 5 156 5 201 50 1807 50 1892
structaset 5 202 5 278 50 397 50 486
throw 5 1091 5 1256 50 1423 50 1553

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) 1543259 1296462 203 2644 0 0% 0 0 74.79866
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 39.112816
erubi-rails (click) 1361420 1170075 269 3634 22 0% 0 0 97.279874
hexapdf (click) 1521001 1262460 593 15660 44 0% 0 0 436.008808
liquid-c (click) 558061 522337 114 2231 5 0% 0 0 59.858548
liquid-compile (click) 482886 451477 146 2748 2 0% 0 0 80.500529
liquid-render (click) 664200 613070 131 2950 8 0% 0 0 79.568051
lobsters (click) 8685357 7292613 3125 63980 117 0% 0 0 2108.597717
mail (click) 862405 798308 345 7700 40 0% 0 0 213.533126
psych-load (click) 287470 265085 61 829 2 0% 0 0 23.712992
railsbench (click) 3339246 2881528 1591 19681 97 0% 0 0 551.258234
rubocop (click) 5757092 4985145 3002 56853 125 0% 6 0 1657.925642
ruby-lsp (click) 1037734 841564 408 7395 47 0% 1 0 204.808028
sequel (click) 502357 439055 11 119 0 0% 0 0 3.888858
shipit (click) 7111046 6034009 3298 51966 169 0% 0 0 1705.752863
addressable-equality (click) 316354 301022 44 1379 1 0% 0 0 34.219549
addressable-getters (click) 273753 207421 26 863 0 0% 0 0 21.00013
addressable-join (click) 282677 252780 24 941 0 0% 0 0 23.699023
addressable-merge (click) 282183 263175 27 896 0 0% 0 0 22.288266
addressable-new (click) 256440 235563 21 563 0 0% 0 0 14.331662
addressable-normalize (click) 308964 267914 43 1326 1 0% 0 0 32.540969
addressable-parse (click) 279495 253999 26 880 0 0% 0 0 21.800955
addressable-setters (click) 257734 230551 20 582 0 0% 0 0 14.575608
addressable-to-s (click) 276386 234694 26 849 0 0% 0 0 20.550349
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.807877
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.229905
erubi (click) 244122 194044 6 132 0 0% 0 0 3.994517
etanni (click) 32837 27420 8 111 0 0% 0 0 3.438269
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.043348
fluentd (click) 483311 432624 7 115 0 0% 0 0 3.720514
graphql (click) 408970 392102 73 1899 19 1% 0 0 53.554744
graphql-native (click) 353138 333901 39 532 0 0% 0 0 14.271449
knucleotide (click) 9663 10633 7 107 0 0% 0 0 5.214593
lee (click) 316677 295034 49 1091 0 0% 0 0 31.401755
matmul (click) 11103 4709 8 136 0 0% 0 0 4.204804
nbody (click) 14448 21176 6 251 0 0% 0 0 6.13976
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.405185
optcarrot (click) 326157 307271 188 4744 34 0% 0 0 111.392944
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 72.865208
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.822033
rack (click) 282566 251821 35 627 0 0% 0 0 16.325547
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.772851
rubyboy (click) 704467 622628 154 6869 42 0% 0 0 167.09951
rubykon (click) 147885 147937 137 2093 3 0% 0 0 56.942324
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.162852
tinygql (click) 300166 254813 59 1031 5 0% 0 0 27.321701
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1955.760898
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 495.029101
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.103675
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.546711
fib (click) 2659 2995 3 30 0 0% 0 0 1.100815
getivar (click) 3789 6778 3 79 0 0% 0 0 1.934374
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.344731
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.772051
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.907984
object-new (click) 2406 2818 2 36 0 0% 0 0 1.128016
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.18354
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.826898
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.813044
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.133948
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.494771
setivar (click) 2783 3726 3 46 0 0% 0 0 1.269633
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.443384
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.721326
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.45547
structaref (click) 4407 9095 3 88 0 0% 0 0 2.364104
structaset (click) 4113 5834 3 70 0 0% 0 0 1.822209
throw (click) 5953 4624 5 53 0 0% 0 0 1.770218

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.