Ruby Benchmarks

Details for Benchmarks at 2026-02-11 00:58:18 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 92.6% faster than CRuby 4.1.0dev
  • 5.6% faster than YJIT 3.4.7
On railsbench it is
  • 117.0% faster than CRuby 4.1.0dev
  • 12.0% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 24 minutes
aarch64 runtime: 7 hours, 19 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 99 50 199 50 226
chunky-png 5 31 5 33 50 33 50 27
erubi-rails 5 15 5 16 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 432 50 623 50 640
liquid-compile 5 418 5 482 50 544 50 736
liquid-render 5 170 5 177 50 432 50 432
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 192 50 252 50 267
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 154 5 160 50 246 50 253
ruby-lsp 5 158 5 163 50 228 50 232
sequel 5 426 5 429 50 568 50 600
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 12
addressable-getters 5 164 5 174 50 183 50 196
addressable-join 5 74 5 76 50 66 50 71
addressable-merge 5 159 5 158 50 222 50 223
addressable-new 5 351 5 360 50 518 50 531
addressable-normalize 5 53 5 54 50 58 50 61
addressable-parse 5 103 5 107 50 103 50 110
addressable-setters 5 184 5 185 50 230 50 235
addressable-to-s 5 163 5 171 50 182 50 197
binarytrees 5 82 5 85 50 136 50 154
blurhash 5 83 5 86 50 143 50 145
erubi 5 136 5 150 50 139 50 147
etanni 5 99 5 73 50 72 50 38
fannkuchredux 5 54 5 57 50 102 50 107
fluentd 5 56 5 63 50 20 50 23
graphql 5 358 5 465 50 569 50 950
graphql-native 5 59 5 88 50 22 50 70
knucleotide 5 163 5 154 50 118 50 109
lee 5 23 5 23 50 10 50 10
matmul 5 51 5 56 50 95 50 97
nbody 5 246 5 298 50 676 50 698
nqueens 5 116 5 126 50 556 50 580
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 176 5 182 50 707 50 719
protoboeuf-encode 5 198 5 207 50 835 50 830
rack 5 440 5 461 50 715 50 719
ruby-json 5 82 5 101 50 51 50 76
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 48 50 156 50 169
tinygql 5 41 5 43 50 36 50 50
30k_ifelse 5 28 5 28 50 186 50 184
30k_methods 5 38 5 40 50 456 50 456
attr_accessor 5 157 5 199 50 1835 50 1915
cfunc_itself 5 348 5 340 50 1255 50 1259
fib 5 124 5 144 50 940 50 939
getivar 5 215 5 312 50 2314 50 2422
getivar-module 5 104 5 133 50 90 50 266
keyword_args 5 100 5 95 50 1240 50 1242
loops-times 5 23 5 27 50 64 50 62
object-new 5 268 5 386 50 297 50 777
respond_to 5 139 5 136 50 3892 50 3903
ruby-xor 5 236 5 246 50 1313 50 1284
send_bmethod 5 117 5 126 50 5538 50 4527
send_cfunc_block 5 105 5 106 50 353 50 375
send_rubyfunc_block 5 250 5 249 50 6923 50 6925
setivar 5 359 5 485 50 4924 50 5047
setivar_object 5 341 5 303 50 751 50 644
setivar_young 5 341 5 307 50 797 50 662
str_concat 5 390 5 452 50 1200 50 1182
structaref 5 156 5 193 50 1810 50 1889
structaset 5 202 5 273 50 397 50 500
throw 5 1091 5 1306 50 1404 50 1676

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) 1544770 1349611 203 2651 0 0% 0 0 75.323409
chunky-png (click) 321179 303991 79 1376 1 0% 0 0 38.965454
erubi-rails (click) 1378815 1215575 268 3731 22 0% 0 0 100.974919
hexapdf (click) 1526389 1338476 594 15714 44 0% 0 0 438.211375
liquid-c (click) 546544 433708 114 2236 5 0% 0 0 59.780521
liquid-compile (click) 481351 424317 146 2726 2 0% 0 0 79.110939
liquid-render (click) 665016 554612 131 2959 8 0% 0 0 79.228736
lobsters (click) 8714142 7295632 3123 64237 117 0% 0 0 2113.715081
mail (click) 867906 752981 345 7726 40 0% 0 0 214.352373
psych-load (click) 288477 240804 61 831 2 0% 0 0 24.255997
railsbench (click) 3346931 2860876 1591 19716 97 0% 0 0 554.031596
rubocop (click) 5779875 5109725 3002 57103 125 0% 6 0 1662.376763
ruby-lsp (click) 1033725 886491 408 7461 46 0% 1 0 204.96246
sequel (click) 502876 421939 11 119 0 0% 0 0 4.001108
shipit (click) 7469419 6277278 3440 55800 174 0% 1 0 1821.817073
addressable-equality (click) 317135 284837 44 1380 1 0% 0 0 34.477081
addressable-getters (click) 276940 252020 26 863 0 0% 0 0 20.969992
addressable-join (click) 282314 252321 24 941 0 0% 0 0 23.462902
addressable-merge (click) 282872 263426 27 896 0 0% 0 0 22.230919
addressable-new (click) 257703 236358 21 563 0 0% 0 0 14.10103
addressable-normalize (click) 312976 280212 43 1329 1 0% 0 0 32.922475
addressable-parse (click) 280184 262442 26 880 0 0% 0 0 21.611127
addressable-setters (click) 257371 238284 20 582 0 0% 0 0 14.740554
addressable-to-s (click) 277173 226892 26 849 0 0% 0 0 20.733534
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.779344
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.225315
erubi (click) 248188 222477 6 134 0 0% 0 0 3.894491
etanni (click) 33355 27108 8 114 0 0% 0 0 3.488121
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.055504
fluentd (click) 488033 411846 7 116 0 0% 0 0 3.756217
graphql (click) 410164 374639 73 1909 19 0% 0 0 53.564902
graphql-native (click) 354632 283879 39 532 0 0% 0 0 13.89816
knucleotide (click) 9939 10477 7 110 0 0% 0 0 4.900182
lee (click) 308232 258247 49 1099 0 0% 0 0 31.167635
matmul (click) 11103 4709 8 136 0 0% 0 0 4.258373
nbody (click) 14448 21176 6 251 0 0% 0 0 6.14205
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.327456
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 108.631817
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 73.237477
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.414142
rack (click) 271456 236646 35 581 0 0% 0 0 15.328602
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.733515
rubyboy (click) 704412 704193 154 6871 42 0% 0 0 168.586309
rubykon (click) 149667 148880 138 2117 4 0% 0 0 56.689287
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.104223
tinygql (click) 300330 254709 59 1031 5 0% 0 0 27.181552
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1976.788396
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 490.601651
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.092398
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.476968
fib (click) 2659 2995 3 30 0 0% 0 0 1.141143
getivar (click) 3789 6778 3 79 0 0% 0 0 1.920014
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.342462
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.846085
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.939927
object-new (click) 2406 2818 2 36 0 0% 0 0 1.038946
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.15977
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.8316
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.830583
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.785913
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.495773
setivar (click) 2783 3726 3 46 0 0% 0 0 1.268344
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.424328
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.723551
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.467408
structaref (click) 4407 9095 3 88 0 0% 0 0 2.358552
structaset (click) 4113 5834 3 70 0 0% 0 0 1.761753
throw (click) 5953 4624 5 53 0 0% 0 0 1.737298

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.