YJIT Benchmarks

Details for Benchmarks at 2025-05-23 03:51:19 UTC

YJIT metrics from the yjit-bench suite using Ruby 9583b7af8f.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 91.9% faster than CRuby 3.5.0dev
  • 6.8% faster than YJIT 3.3.6
On railsbench it is
  • 104.0% faster than CRuby 3.5.0dev
  • 7.5% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 26 minutes
aarch64 runtime: 3 hours, 47 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.3.6 warmups CRuby 3.3.6 iters CRuby 3.5.0dev warmups CRuby 3.5.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.5.0dev warmups YJIT 3.5.0dev iters
activerecord 5 82 5 82 50 155 50 167
chunky-png 5 31 5 32 50 14 50 22
erubi-rails 5 16 5 14 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 415 5 422 50 586 50 619
liquid-compile 5 406 5 465 50 543 50 709
liquid-render 5 169 5 168 50 407 50 445
lobsters 5 20 5 19 50 10 50 10
mail 5 188 5 175 50 250 50 219
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 154 50 248 50 259
ruby-lsp 5 157 5 154 50 248 50 266
sequel 5 415 5 424 50 592 50 584
binarytrees 5 84 5 84 50 146 50 135
blurhash 5 82 5 86 50 127 50 145
erubi 5 119 5 141 50 97 50 146
etanni 5 91 5 98 50 54 50 69
fannkuchredux 5 52 5 58 50 97 50 106
fluentd 5 64 5 64 50 26 50 31
graphql 5 85 5 85 50 57 50 57
graphql-native 5 40 5 56 50 10 50 19
lee 5 23 5 24 50 10 50 10
matmul 5 51 5 53 50 88 50 97
nbody 5 249 5 254 50 585 50 707
nqueens 5 120 5 127 50 75 50 575
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 174 5 185 50 620 50 720
protoboeuf-encode 5 179 5 204 50 326 50 789
rack 5 582 5 632 50 944 50 1052
ruby-json 5 84 5 84 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 51 50 163 50 166
tinygql 5 36 5 38 50 22 50 31
30k_ifelse 5 28 5 27 50 215 50 184
30k_methods 5 39 5 38 50 480 50 474
cfunc_itself 5 358 5 360 50 1147 50 1259
fib 5 127 5 138 50 903 50 931
getivar 5 213 5 332 50 2255 50 2420
keyword_args 5 104 5 111 50 1041 50 1242
loops-times 5 24 5 26 50 48 50 61
object-new 5 321 5 350 50 404 50 520
respond_to 5 133 5 133 50 3257 50 3895
ruby-xor 5 245 5 251 50 799 50 1313
setivar 5 361 5 599 50 3184 50 5093
setivar_object 5 353 5 445 50 671 50 747
setivar_young 5 368 5 445 50 703 50 755
str_concat 5 397 5 453 50 979 50 1163
throw 5 1268 5 1260 50 1727 50 1695

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) 1484482 1308360 206 2590 0 0% 0 0 75.460884
chunky-png (click) 305368 267284 74 1330 1 0% 0 0 38.829153
erubi-rails (click) 1983282 1705237 262 3686 21 0% 0 0 103.801771
hexapdf (click) 1488835 1300152 593 15617 39 0% 0 0 451.254113
liquid-c (click) 498591 497761 114 2217 5 0% 0 0 61.493928
liquid-compile (click) 455986 398741 146 2737 2 0% 0 0 81.505816
liquid-render (click) 598939 543208 131 2933 8 0% 0 0 81.395802
lobsters (click) 8525896 7065483 3172 63779 118 0% 0 0 2154.311388
mail (click) 820144 770429 342 7227 40 0% 0 0 209.792419
psych-load (click) 259035 238250 61 825 3 0% 0 0 24.900361
railsbench (click) 3376822 3058375 1653 20218 56 0% 0 0 619.251567
rubocop (click) 5889575 4920297 2885 61731 113 0% 4 0 1819.719878
ruby-lsp (click) 865064 773698 305 5956 29 0% 0 0 168.336899
sequel (click) 509587 473116 11 114 0 0% 0 0 3.87312
binarytrees (click) 7273 6911 6 64 0 0% 0 0 2.5619
blurhash (click) 52289 51444 27 603 0 0% 0 0 18.462152
erubi (click) 265891 207603 5 125 0 0% 0 0 3.877926
etanni (click) 30806 32125 8 108 0 0% 0 0 3.532945
fannkuchredux (click) 24746 40953 3 399 0 0% 0 0 11.135123
fluentd (click) 392134 343700 7 115 0 0% 0 0 3.753626
graphql (click) 418380 379221 66 1035 0 0% 0 0 29.024794
graphql-native (click) 395024 324209 37 399 0 0% 0 0 11.379439
lee (click) 316659 275857 45 1012 0 0% 0 0 30.811126
matmul (click) 11125 4603 8 132 0 0% 0 0 4.255396
nbody (click) 13890 20235 6 238 0 0% 0 0 5.860684
nqueens (click) 22652 36960 5 387 0 0% 0 0 10.404611
optcarrot (click) 325946 290644 188 4740 34 0% 0 0 115.085533
protoboeuf (click) 170142 177773 12 2836 0 0% 0 0 75.486295
protoboeuf-encode (click) 243031 283791 14 1815 0 0% 0 0 47.107848
rack (click) 248926 222508 31 496 0 0% 0 0 12.63445
ruby-json (click) 24392 21840 8 204 0 0% 0 0 5.757721
rubyboy (click) 690954 626088 177 6963 40 0% 0 0 176.773555
rubykon (click) 146417 162602 137 2076 3 0% 0 0 57.317441
sudoku (click) 52157 66291 7 871 0 0% 0 0 24.042861
tinygql (click) 275703 258830 58 977 5 0% 0 0 27.189097
30k_ifelse (click) 6219958 5057296 9259 75432 0 0% 0 0 1980.57958
30k_methods (click) 2234566 1592952 5778 19357 0 0% 0 0 492.665925
cfunc_itself (click) 5127 4155 4 53 0 0% 0 0 1.502941
fib (click) 2659 2995 3 30 0 0% 0 0 1.087071
getivar (click) 3812 6802 3 78 0 0% 0 0 1.900958
keyword_args (click) 6332 4965 5 56 0 0% 0 0 1.782239
loops-times (click) 6972 8013 5 93 0 0% 0 0 2.749124
object-new (click) 2406 2818 2 36 0 0% 0 0 1.130151
respond_to (click) 6451 6819 4 80 0 0% 0 0 2.144486
ruby-xor (click) 5876 8690 4 100 0 0% 0 0 2.71247
setivar (click) 2783 3726 3 46 0 0% 0 0 1.261572
setivar_object (click) 3402 3956 3 49 0 0% 0 0 1.401071
setivar_young (click) 4297 4867 4 63 0 0% 0 0 1.71959
str_concat (click) 5799 6969 6 82 0 0% 0 0 2.467185
throw (click) 5953 4624 5 53 0 0% 0 0 1.827427

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.