Ruby Benchmarks

Details for Benchmarks at 2026-02-08 01:04:57 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.8% faster than CRuby 4.1.0dev
  • 6.7% faster than YJIT 3.4.7
On railsbench it is
  • 114.6% faster than CRuby 4.1.0dev
  • 12.2% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 20 minutes
aarch64 runtime: 7 hours, 14 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 89 5 97 50 190 50 237
chunky-png 5 31 5 33 50 32 50 29
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 427 50 624 50 640
liquid-compile 5 419 5 480 50 582 50 739
liquid-render 5 171 5 174 50 434 50 439
lobsters 5 20 5 20 50 10 50 10
mail 5 193 5 194 50 253 50 265
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 160 5 166 50 216 50 236
sequel 5 421 5 429 50 596 50 597
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 11
addressable-getters 5 164 5 169 50 183 50 199
addressable-join 5 73 5 78 50 64 50 70
addressable-merge 5 160 5 158 50 222 50 224
addressable-new 5 354 5 358 50 526 50 530
addressable-normalize 5 53 5 54 50 58 50 60
addressable-parse 5 104 5 104 50 103 50 111
addressable-setters 5 184 5 185 50 230 50 234
addressable-to-s 5 163 5 168 50 181 50 200
binarytrees 5 82 5 85 50 136 50 145
blurhash 5 83 5 88 50 143 50 145
erubi 5 137 5 151 50 130 50 148
etanni 5 98 5 73 50 71 50 39
fannkuchredux 5 55 5 56 50 101 50 106
fluentd 5 56 5 67 50 20 50 25
graphql 5 371 5 467 50 570 50 808
graphql-native 5 58 5 88 50 23 50 68
knucleotide 5 163 5 155 50 118 50 109
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 55 50 94 50 98
nbody 5 244 5 292 50 677 50 698
nqueens 5 116 5 126 50 556 50 578
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 183 50 707 50 773
protoboeuf-encode 5 197 5 210 50 835 50 848
rack 5 440 5 462 50 703 50 731
ruby-json 5 84 5 102 50 46 50 74
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 40 50 50
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 41 50 457 50 450
attr_accessor 5 157 5 192 50 1832 50 1911
cfunc_itself 5 348 5 348 50 1255 50 1259
fib 5 124 5 144 50 940 50 939
getivar 5 217 5 293 50 2315 50 2402
getivar-module 5 104 5 124 50 90 50 265
keyword_args 5 100 5 102 50 1240 50 1243
loops-times 5 23 5 27 50 64 50 63
object-new 5 268 5 386 50 298 50 772
respond_to 5 139 5 137 50 3887 50 3896
ruby-xor 5 236 5 246 50 1314 50 1284
send_bmethod 5 117 5 124 50 5539 50 4526
send_cfunc_block 5 106 5 105 50 353 50 346
send_rubyfunc_block 5 250 5 255 50 6924 50 6921
setivar 5 359 5 482 50 4924 50 5045
setivar_object 5 341 5 302 50 752 50 640
setivar_young 5 341 5 306 50 798 50 662
str_concat 5 390 5 456 50 1199 50 1166
structaref 5 156 5 180 50 1812 50 1863
structaset 5 202 5 254 50 399 50 493
throw 5 1090 5 1277 50 1411 50 1666

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) 1545983 1332984 203 2658 0 0% 0 0 76.82162
chunky-png (click) 320926 304361 79 1374 1 0% 0 0 39.050457
erubi-rails (click) 1372020 1149725 269 3656 22 0% 0 0 98.355565
hexapdf (click) 1521482 1311986 593 15681 44 0% 0 0 438.504973
liquid-c (click) 559498 540243 114 2231 5 0% 0 0 59.971969
liquid-compile (click) 478705 422888 146 2709 2 0% 0 0 78.710441
liquid-render (click) 664686 588800 131 2950 8 0% 0 0 79.823997
lobsters (click) 8689058 7314901 3123 63977 117 0% 0 0 2150.666224
mail (click) 867038 836068 345 7705 40 0% 0 0 214.746009
psych-load (click) 287997 265460 61 829 2 0% 0 0 24.214707
railsbench (click) 3353429 2848843 1591 19775 97 0% 0 0 557.641268
rubocop (click) 5769761 5049306 3002 56967 125 0% 6 0 1670.091238
ruby-lsp (click) 1038120 923731 409 7421 47 0% 1 0 206.03453
sequel (click) 504290 415317 11 119 0 0% 0 0 4.120143
shipit (click) 7572883 6360506 3366 53538 179 0% 1 0 1800.662288
addressable-equality (click) 316879 268629 44 1379 1 0% 0 0 34.819414
addressable-getters (click) 276265 242615 26 863 0 0% 0 0 21.214253
addressable-join (click) 282775 236535 24 941 0 0% 0 0 23.809681
addressable-merge (click) 281670 253666 27 896 0 0% 0 0 22.62628
addressable-new (click) 253511 216718 21 569 0 0% 0 0 14.457183
addressable-normalize (click) 313939 273546 43 1345 1 0% 0 0 33.626272
addressable-parse (click) 280181 254565 26 882 0 0% 0 0 22.062135
addressable-setters (click) 257895 222570 20 584 0 0% 0 0 14.612537
addressable-to-s (click) 277684 238124 26 971 0 0% 0 0 23.53393
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.813735
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.195685
erubi (click) 247678 230981 6 132 0 0% 0 0 3.918426
etanni (click) 32837 27420 8 111 0 0% 0 0 3.496053
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.152017
fluentd (click) 485640 468304 7 115 0 0% 0 0 3.842104
graphql (click) 407532 365493 73 1895 19 1% 0 0 53.712754
graphql-native (click) 352758 341746 39 532 0 0% 0 0 14.450472
knucleotide (click) 9663 10633 7 107 0 0% 0 0 4.769934
lee (click) 316575 277674 49 1091 0 0% 0 0 31.50973
matmul (click) 11103 4709 8 136 0 0% 0 0 4.212654
nbody (click) 14448 21176 6 251 0 0% 0 0 6.174538
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.401811
optcarrot (click) 318985 294662 188 4587 34 0% 0 0 109.439138
protoboeuf (click) 169555 177006 12 2829 0 0% 0 0 73.590175
protoboeuf-encode (click) 242967 283659 14 1815 0 0% 0 0 44.564563
rack (click) 283011 260289 35 632 0 0% 0 0 16.810879
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.7556
rubyboy (click) 705218 639209 154 6871 42 0% 0 0 168.025489
rubykon (click) 148982 149243 138 2107 4 0% 0 0 57.170605
sudoku (click) 51704 65882 7 870 0 0% 0 0 23.225647
tinygql (click) 302652 247641 59 1031 5 0% 0 0 27.481277
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1962.610341
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 492.842839
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.080406
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.530809
fib (click) 2659 2995 3 30 0 0% 0 0 1.13625
getivar (click) 3789 6778 3 79 0 0% 0 0 1.958237
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.369277
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.826122
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.92362
object-new (click) 2406 2818 2 36 0 0% 0 0 1.035771
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.131922
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.82143
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.837276
send_cfunc_block (click) 14429 12201 5 192 0 0% 0 0 4.136964
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.476384
setivar (click) 2783 3726 3 46 0 0% 0 0 1.267668
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.429304
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.728709
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.397411
structaref (click) 4407 9095 3 88 0 0% 0 0 2.36516
structaset (click) 4113 5834 3 70 0 0% 0 0 1.774337
throw (click) 5953 4624 5 53 0 0% 0 0 1.804952

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.