Ruby Benchmarks

Details for Benchmarks at 2026-03-03 00:53:06 UTC

YJIT metrics from the ruby-bench suite using Ruby 993c7a272a.

Using the geomean of the headline benchmarks for x86 YJIT 4.1.0dev is
  • 94.1% faster than CRuby 4.1.0dev
  • 7.5% faster than YJIT 3.4.7
On railsbench it is
  • 113.2% faster than CRuby 4.1.0dev
  • 12.3% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 23 minutes
aarch64 runtime: 7 hours, 16 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 190 50 242
chunky-png 5 31 5 32 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 417 5 435 50 626 50 649
liquid-compile 5 416 5 482 50 580 50 723
liquid-render 5 172 5 175 50 434 50 447
lobsters 5 20 5 20 50 10 50 10
mail 5 194 5 200 50 252 50 262
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 245 50 256
ruby-lsp 5 164 5 165 50 213 50 234
sequel 5 426 5 435 50 599 50 611
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 28 50 11 50 15
addressable-getters 5 164 5 173 50 183 50 203
addressable-join 5 73 5 81 50 65 50 75
addressable-merge 5 159 5 162 50 221 50 232
addressable-new 5 352 5 359 50 523 50 530
addressable-normalize 5 53 5 56 50 59 50 64
addressable-parse 5 103 5 107 50 105 50 114
addressable-setters 5 182 5 188 50 231 50 240
addressable-to-s 5 163 5 174 50 182 50 201
binarytrees 5 82 5 87 50 136 50 148
blurhash 5 83 5 87 50 143 50 145
erubi 5 140 5 150 50 135 50 154
etanni 5 98 5 73 50 71 50 40
fannkuchredux 5 54 5 50 50 101 50 90
fluentd 5 57 5 64 50 20 50 35
graphql 5 360 5 465 50 572 50 950
graphql-native 5 57 5 89 50 23 50 69
knucleotide 5 163 5 162 50 118 50 115
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 50 50 94 50 96
nbody 5 246 5 272 50 677 50 700
nqueens 5 116 5 124 50 556 50 593
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 179 50 706 50 756
protoboeuf-encode 5 197 5 196 50 832 50 817
rack 5 442 5 467 50 702 50 733
ruby-json 5 82 5 104 50 47 50 75
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 168
tinygql 5 40 5 45 50 36 50 50
30k_ifelse 5 28 5 28 50 184 50 184
30k_methods 5 38 5 40 50 456 50 452
attr_accessor 5 157 5 208 50 1835 50 1937
cfunc_itself 5 347 5 350 50 1255 50 1259
fib 5 124 5 142 50 939 50 940
getivar 5 217 5 293 50 2315 50 2408
getivar-module 5 104 5 126 50 90 50 262
keyword_args 5 100 5 96 50 1240 50 1243
loops-times 5 23 5 24 50 63 50 59
object-new 5 268 5 413 50 295 50 920
respond_to 5 139 5 137 50 3893 50 3896
ruby-xor 5 236 5 252 50 1312 50 1296
send_bmethod 5 117 5 122 50 5538 50 4527
send_cfunc_block 5 106 5 106 50 353 50 384
send_rubyfunc_block 5 251 5 249 50 6923 50 6920
setivar 5 359 5 435 50 4922 50 5011
setivar_object 5 341 5 303 50 755 50 626
setivar_young 5 341 5 307 50 799 50 655
str_concat 5 391 5 452 50 1199 50 1191
structaref 5 156 5 193 50 1812 50 1888
structaset 5 201 5 229 50 398 50 489
throw 5 1090 5 1404 50 1422 50 1818

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) 1548624 1296593 203 2654 0 0% 0 0 75.671999
chunky-png (click) 307885 289024 79 1376 1 0% 0 0 39.134317
erubi-rails (click) 1380203 1111423 268 3672 22 0% 0 0 98.139601
hexapdf (click) 1527722 1291070 593 15736 44 0% 0 0 438.814561
liquid-c (click) 558106 512060 114 2236 5 0% 0 0 59.046438
liquid-compile (click) 480798 448187 146 2709 2 0% 0 0 78.536381
liquid-render (click) 653516 524526 131 2959 8 0% 0 0 79.89858
lobsters (click) 8722576 7349813 3126 64391 122 0% 0 0 2226.741634
mail (click) 870996 845804 345 7728 40 0% 0 0 214.461843
psych-load (click) 290069 258822 61 831 2 0% 0 0 23.994289
railsbench (click) 3356048 2807354 1592 19737 97 0% 0 0 559.035182
rubocop (click) 5792119 4991989 3002 57225 125 0% 6 0 1673.38775
ruby-lsp (click) 1042159 969396 408 7446 46 0% 1 0 205.381966
sequel (click) 494106 376853 11 119 0 0% 0 0 4.054556
shipit (click) 7134921 5982992 3301 52163 168 0% 0 0 1707.078145
addressable-equality (click) 317290 260422 44 1380 1 0% 0 0 34.209079
addressable-getters (click) 264178 221078 26 863 0 0% 0 0 21.109713
addressable-join (click) 283400 269027 24 941 0 0% 0 0 23.505608
addressable-merge (click) 282404 229605 27 898 0 0% 0 0 22.376762
addressable-new (click) 256981 235018 21 565 0 0% 0 0 13.946586
addressable-normalize (click) 314516 281700 43 1352 1 0% 0 0 33.454979
addressable-parse (click) 279296 252694 26 880 0 0% 0 0 21.596143
addressable-setters (click) 258054 197840 20 582 0 0% 0 0 14.538564
addressable-to-s (click) 277231 202338 26 849 0 0% 0 0 20.655888
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.830185
blurhash (click) 52292 43311 27 605 0 0% 0 0 18.155072
erubi (click) 247549 221146 6 134 0 0% 0 0 3.92012
etanni (click) 32900 34696 8 114 0 0% 0 0 3.46207
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.045088
fluentd (click) 487528 427676 7 116 0 0% 0 0 3.781677
graphql (click) 410242 350137 73 1909 19 0% 0 0 54.075113
graphql-native (click) 341669 318295 39 532 0 0% 0 0 14.336872
knucleotide (click) 9939 10477 7 110 0 0% 0 0 6.517025
lee (click) 317950 269769 49 1099 0 0% 0 0 31.513206
matmul (click) 11103 4709 8 136 0 0% 0 0 4.181798
nbody (click) 14448 21176 6 251 0 0% 0 0 6.091073
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.384557
optcarrot (click) 319416 277986 188 4589 34 0% 0 0 109.158391
protoboeuf (click) 169627 176954 12 2830 0 0% 0 0 72.956987
protoboeuf-encode (click) 243323 242439 14 1820 0 0% 0 0 44.530536
rack (click) 286407 255736 35 628 0 0% 0 0 16.484653
ruby-json (click) 20323 18532 8 206 0 0% 0 0 5.658094
rubyboy (click) 704313 588536 154 6871 42 0% 0 0 168.403126
rubykon (click) 148683 164130 138 2104 4 0% 0 0 57.079657
sudoku (click) 51776 65830 7 871 0 0% 0 0 23.272006
tinygql (click) 301421 287803 59 1031 5 0% 0 0 27.145594
30k_ifelse (click) 6265364 5037717 9260 76309 0 0% 0 0 1957.179824
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 493.48797
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.105494
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.513547
fib (click) 2659 2995 3 30 0 0% 0 0 1.137863
getivar (click) 3789 6778 3 79 0 0% 0 0 1.925162
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.341352
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.827631
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.897791
object-new (click) 2406 2818 2 36 0 0% 0 0 1.054416
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.175135
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.80517
send_bmethod (click) 5508 5328 6 71 0 0% 0 0 1.806554
send_cfunc_block (click) 13777 10257 5 192 0 0% 0 0 3.795634
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.480369
setivar (click) 2783 3726 3 46 0 0% 0 0 1.274903
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.386185
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.723272
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.442068
structaref (click) 4407 9095 3 88 0 0% 0 0 2.315019
structaset (click) 4113 5834 3 70 0 0% 0 0 1.762273
throw (click) 5953 4624 5 53 0 0% 0 0 1.766057

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.