Ruby Benchmarks

Details for Benchmarks at 2025-12-10 00:42:12 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 4.0.0dev is
  • 92.8% faster than CRuby 4.0.0dev
  • 1.8% faster than YJIT 3.4.7
On railsbench it is
  • 99.8% faster than CRuby 4.0.0dev
  • 2.9% faster than YJIT 3.4.7
x86_64 runtime: 8 hours, 20 minutes
aarch64 runtime: 7 hours, 13 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.0.0dev warmups CRuby 4.0.0dev iters YJIT 3.4.7 warmups YJIT 3.4.7 iters YJIT 4.0.0dev warmups YJIT 4.0.0dev iters
activerecord 5 84 5 88 50 192 50 228
chunky-png 5 31 5 33 50 33 50 30
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 422 5 399 50 628 50 560
liquid-compile 5 418 5 473 50 582 50 720
liquid-render 5 168 5 167 50 437 50 380
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 179 50 254 50 209
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 153 5 157 50 246 50 250
ruby-lsp 5 142 5 146 50 236 50 246
sequel 5 422 5 434 50 586 50 604
shipit 5 10 5 10 50 10 50 10
addressable-equality 5 27 5 27 50 11 50 10
addressable-getters 5 164 5 165 50 183 50 188
addressable-join 5 74 5 52 50 65 50 20
addressable-merge 5 159 5 154 50 222 50 213
addressable-new 5 356 5 344 50 521 50 508
addressable-normalize 5 53 5 53 50 59 50 56
addressable-parse 5 103 5 102 50 104 50 103
addressable-setters 5 185 5 179 50 228 50 223
addressable-to-s 5 163 5 163 50 183 50 188
binarytrees 5 81 5 83 50 136 50 132
blurhash 5 83 5 87 50 143 50 145
erubi 5 137 5 135 50 134 50 133
etanni 5 98 5 69 50 71 50 35
fannkuchredux 5 54 5 57 50 102 50 97
fluentd 5 56 5 58 50 23 50 30
graphql 5 371 5 456 50 573 50 921
graphql-native 5 58 5 79 50 23 50 62
gvl_release_acquire 5 375 5 403 50 378 50 396
knucleotide 5 163 5 162 50 118 50 116
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 52 50 94 50 89
nbody 5 247 5 260 50 676 50 666
nqueens 5 116 5 126 50 556 50 568
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 172 5 183 50 706 50 752
protoboeuf-encode 5 192 5 210 50 835 50 813
rack 5 436 5 458 50 710 50 704
ruby-json 5 82 5 100 50 50 50 69
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 157 50 152
tinygql 5 40 5 44 50 39 50 47
30k_ifelse 5 28 5 28 50 184 50 183
30k_methods 5 38 5 40 50 458 50 449
attr_accessor 5 157 5 207 50 1833 50 1933
cfunc_itself 5 348 5 354 50 1255 50 1259
fib 5 124 5 143 50 939 50 940
getivar 5 218 5 314 50 2316 50 2423
getivar-module 5 104 5 140 50 90 50 268
keyword_args 5 100 5 107 50 1240 50 1242
loops-times 5 23 5 26 50 64 50 56
object-new 5 268 5 352 50 299 50 585
respond_to 5 139 5 138 50 3887 50 3902
ruby-xor 5 236 5 257 50 1314 50 1290
send_bmethod 5 117 5 124 50 5538 50 5544
send_cfunc_block 5 106 5 97 50 353 50 328
send_rubyfunc_block 5 250 5 256 50 6924 50 6932
setivar 5 360 5 393 50 4925 50 4973
setivar_object 5 341 5 333 50 753 50 603
setivar_young 5 341 5 335 50 801 50 640
str_concat 5 388 5 449 50 1200 50 1156
structaref 5 157 5 216 50 1811 50 1920
structaset 5 201 5 243 50 399 50 354
throw 5 1086 5 1262 50 1414 50 1575

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) 1547706 1361120 205 2579 0 0% 0 0 73.071384
chunky-png (click) 320454 295204 79 1381 1 0% 0 0 39.270779
erubi-rails (click) 1362479 1211315 267 3623 22 0% 0 0 97.545289
hexapdf (click) 1521810 1328469 594 15662 44 0% 0 0 441.011217
liquid-c (click) 555183 469679 114 2228 5 0% 0 0 60.585917
liquid-compile (click) 479341 398528 146 2733 2 0% 0 0 79.263343
liquid-render (click) 661834 560887 131 2946 8 0% 0 0 81.309063
lobsters (click) 8518794 7232710 3100 62370 118 0% 0 0 2101.668369
mail (click) 863892 800518 342 7700 40 0% 0 0 214.286189
psych-load (click) 287012 239597 61 828 2 0% 0 0 23.816682
railsbench (click) 3356305 2884050 1605 19632 47 0% 0 0 551.607894
rubocop (click) 5762649 4949062 3002 56858 126 0% 6 0 1666.735977
ruby-lsp (click) 957449 811915 343 6729 45 0% 1 0 181.478497
sequel (click) 501451 404973 11 119 0 0% 0 0 3.96983
shipit (click) 7635865 6366167 3347 53662 181 0% 1 0 1789.632108
addressable-equality (click) 319285 254605 44 1390 1 0% 0 0 34.353798
addressable-getters (click) 277908 219961 26 863 0 0% 0 0 20.903366
addressable-join (click) 289338 235640 24 1005 0 0% 0 0 25.374042
addressable-merge (click) 284945 216352 27 898 0 0% 0 0 22.191488
addressable-new (click) 258183 212141 21 563 0 0% 0 0 13.954454
addressable-normalize (click) 317439 260790 43 1396 1 0% 0 0 34.045008
addressable-parse (click) 282570 238777 26 880 0 0% 0 0 21.582719
addressable-setters (click) 258373 214417 20 582 0 0% 0 0 14.343992
addressable-to-s (click) 277275 251477 26 849 0 0% 0 0 20.572048
binarytrees (click) 7463 7718 6 76 0 0% 0 0 2.809945
blurhash (click) 52292 43311 27 605 0 0% 0 0 17.984722
erubi (click) 246560 221304 6 134 0 0% 0 0 3.911317
etanni (click) 32930 35718 8 114 0 0% 0 0 3.598033
fannkuchredux (click) 24735 32812 3 401 0 0% 0 0 11.027918
fluentd (click) 487806 438765 7 115 0 0% 0 0 3.828906
graphql (click) 409134 376185 73 1921 19 0% 0 0 53.779277
graphql-native (click) 353296 293285 39 532 0 0% 0 0 13.860553
gvl_release_acquire (click) 3998 3842 4 46 0 0% 0 0 1.451334
knucleotide (click) 9997 11103 7 113 0 0% 0 0 5.67799
lee (click) 316928 262334 49 1097 0 0% 0 0 31.329053
matmul (click) 11103 4709 8 136 0 0% 0 0 4.186208
nbody (click) 14448 21176 6 251 0 0% 0 0 6.080682
nqueens (click) 22633 28819 5 389 0 0% 0 0 10.280962
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 110.906633
protoboeuf (click) 170129 185909 12 2837 0 0% 0 0 73.202508
protoboeuf-encode (click) 243065 291927 14 1816 0 0% 0 0 44.193207
rack (click) 281009 264808 35 580 0 0% 0 0 16.243878
ruby-json (click) 19868 17928 8 206 0 0% 0 0 5.774565
rubyboy (click) 702699 653008 154 6864 42 0% 0 0 166.698965
rubykon (click) 146229 153926 137 2070 3 0% 0 0 55.937317
sudoku (click) 52278 66593 7 878 0 0% 0 0 23.500729
tinygql (click) 299612 253610 59 1031 5 0% 0 0 27.306442
30k_ifelse (click) 6222887 5052688 9260 75477 0 0% 0 0 1929.512771
30k_methods (click) 2278087 1643066 5780 19370 0 0% 0 0 491.390503
attr_accessor (click) 4349 7928 3 79 0 0% 0 0 2.097706
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.481998
fib (click) 2659 2995 3 30 0 0% 0 0 1.141722
getivar (click) 3789 6778 3 79 0 0% 0 0 1.936773
getivar-module (click) 6752 11953 4 142 0 0% 0 0 3.296834
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.818838
loops-times (click) 7093 8387 5 100 0 0% 0 0 2.910923
object-new (click) 2406 2818 2 36 0 0% 0 0 1.061527
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.137467
ruby-xor (click) 6037 9212 4 105 0 0% 0 0 2.801591
send_bmethod (click) 5238 4968 6 71 0 0% 0 0 1.733866
send_cfunc_block (click) 14669 12471 5 195 0 0% 0 0 4.254037
send_rubyfunc_block (click) 3904 4074 5 69 0 0% 0 0 1.468432
setivar (click) 2783 3726 3 46 0 0% 0 0 1.263865
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.432766
setivar_young (click) 4300 4867 4 63 0 0% 0 0 1.716262
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.417849
structaref (click) 4407 9095 3 88 0 0% 0 0 2.355011
structaset (click) 3926 5614 3 70 0 0% 0 0 1.704905
throw (click) 5953 4624 5 53 0 0% 0 0 1.826004

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.