YJIT Benchmarks

Details for Benchmarks at 2025-05-09 03:50:37 UTC

YJIT metrics from the yjit-bench suite using Ruby 7a660d7c69.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.1% faster than CRuby 3.5.0dev
  • 7.9% faster than YJIT 3.3.6
On railsbench it is
  • 102.1% faster than CRuby 3.5.0dev
  • 7.6% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 19 minutes
aarch64 runtime: 3 hours, 40 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 83 5 84 50 156 50 173
chunky-png 5 32 5 33 50 15 50 24
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 432 50 590 50 626
liquid-compile 5 409 5 466 50 539 50 703
liquid-render 5 170 5 171 50 404 50 438
lobsters 5 19 5 19 50 10 50 10
mail 5 189 5 179 50 251 50 205
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 157 5 159 50 252 50 271
ruby-lsp 5 158 5 164 50 204 50 272
sequel 5 433 5 426 50 597 50 593
binarytrees 5 84 5 86 50 149 50 139
blurhash 5 82 5 86 50 127 50 145
erubi 5 104 5 143 50 99 50 129
etanni 5 90 5 101 50 54 50 71
fannkuchredux 5 52 5 58 50 99 50 112
fluentd 5 64 5 63 50 25 50 27
graphql 5 85 5 88 50 57 50 60
graphql-native 5 40 5 58 50 10 50 19
lee 5 23 5 26 50 10 50 10
matmul 5 50 5 53 50 85 50 99
nbody 5 248 5 251 50 574 50 634
nqueens 5 120 5 128 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 187 50 620 50 725
protoboeuf-encode 5 180 5 208 50 327 50 810
rack 5 574 5 640 50 954 50 1071
ruby-json 5 84 5 84 50 50 50 49
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 51 50 162 50 171
tinygql 5 36 5 39 50 23 50 33
30k_ifelse 5 28 5 28 50 215 50 207
30k_methods 5 38 5 38 50 480 50 462
cfunc_itself 5 346 5 355 50 1147 50 1258
fib 5 127 5 146 50 910 50 933
getivar 5 207 5 336 50 2239 50 2769
keyword_args 5 107 5 109 50 1042 50 1243
loops-times 5 24 5 27 50 48 50 65
object-new 5 322 5 359 50 404 50 660
respond_to 5 133 5 141 50 3257 50 3989
ruby-xor 5 242 5 254 50 801 50 1375
setivar 5 358 5 599 50 3185 50 5910
setivar_object 5 355 5 465 50 665 50 796
setivar_young 5 365 5 465 50 685 50 795
str_concat 5 397 5 451 50 967 50 1171
throw 5 1261 5 1260 50 1728 50 1662

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) 1449359 1191891 206 2230 0 0% 0 0 64.980379
chunky-png (click) 292000 247831 74 1073 1 0% 0 0 31.879905
erubi-rails (click) 1913106 1573371 263 3102 21 0% 0 0 90.44891
hexapdf (click) 1449841 1201905 595 13372 38 0% 0 0 380.265725
liquid-c (click) 486617 453688 114 1759 5 0% 0 0 49.330298
liquid-compile (click) 414648 321431 146 2191 2 0% 0 0 67.532828
liquid-render (click) 582886 434999 131 2326 8 0% 0 0 66.470206
lobsters (click) 8334688 6971429 3172 54788 112 0% 0 0 1876.068776
mail (click) 765753 685198 342 5636 40 0% 0 0 163.958059
psych-load (click) 252060 219657 61 646 3 0% 0 0 19.410925
railsbench (click) 3299923 2815582 1653 16753 54 0% 0 0 476.698094
rubocop (click) 5724238 4842629 2885 51151 113 0% 4 0 1593.638275
ruby-lsp (click) 822024 770111 305 4837 24 0% 0 0 134.839545
sequel (click) 451424 388802 11 94 0 0% 0 0 3.438345
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.272204
blurhash (click) 50446 50805 27 444 0 0% 0 0 14.268371
erubi (click) 228723 200641 5 99 0 0% 0 0 3.262004
etanni (click) 30101 29597 8 88 0 0% 0 0 2.990238
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.384929
fluentd (click) 383619 299701 7 93 0 0% 0 0 3.205892
graphql (click) 404679 370516 66 705 0 0% 0 0 20.787719
graphql-native (click) 366529 314816 37 293 0 0% 0 0 8.410195
lee (click) 279920 211686 45 799 0 0% 0 0 24.577876
matmul (click) 10810 11796 8 111 0 0% 0 0 3.616857
nbody (click) 13050 17086 6 172 0 0% 0 0 4.440825
nqueens (click) 20756 19597 5 247 0 0% 0 0 7.008507
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 102.180954
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.080629
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.50456
rack (click) 242813 189565 31 384 0 0% 0 0 10.100036
ruby-json (click) 20382 17779 8 181 0 0% 0 0 5.066874
rubyboy (click) 665306 605803 177 5888 40 0% 0 0 146.22102
rubykon (click) 137331 98954 137 1549 3 0% 0 0 44.296939
sudoku (click) 46753 50636 7 535 0 0% 0 0 15.935323
tinygql (click) 275945 222882 58 824 5 0% 0 0 22.548678
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1441.2932
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 459.209097
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.350402
fib (click) 2599 2861 3 26 0 0% 0 0 0.950902
getivar (click) 3501 4713 3 51 0 0% 0 0 1.312706
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.569231
loops-times (click) 6843 7499 5 72 0 0% 0 0 2.343474
object-new (click) 2301 2493 2 29 0 0% 0 0 0.971357
respond_to (click) 6409 6687 4 71 0 0% 0 0 1.883077
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.930435
setivar (click) 2652 3389 3 31 0 0% 0 0 1.001492
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.131256
setivar_young (click) 4031 4260 4 44 0 0% 0 0 1.358613
str_concat (click) 5622 6117 6 64 0 0% 0 0 2.053798
throw (click) 5848 4291 5 46 0 0% 0 0 1.634205

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.