YJIT Benchmarks

Details for Benchmarks at 2025-01-15 03:43:32 UTC

YJIT metrics from the yjit-bench suite using Ruby 04ec077946.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 88.5% faster than CRuby 3.5.0dev
  • 4.9% faster than YJIT 3.3.6
On railsbench it is
  • 99.0% faster than CRuby 3.5.0dev
  • 7.0% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 50 minutes
aarch64 runtime: 3 hours, 17 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 154 50 162
chunky-png 5 31 5 32 50 15 50 33
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 405 5 419 50 563 50 626
liquid-compile 5 410 5 404 50 539 50 585
liquid-render 5 171 5 167 50 403 50 438
lobsters 5 20 5 20 50 10 50 10
mail 5 190 5 194 50 237 50 237
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 155 5 156 50 249 50 266
ruby-lsp 5 158 5 154 50 253 50 206
sequel 5 417 5 415 50 595 50 578
binarytrees 5 84 5 80 50 149 50 133
blurhash 5 82 5 82 50 127 50 144
erubi 5 115 5 147 50 87 50 146
etanni 5 90 5 98 50 54 50 71
fannkuchredux 5 52 5 55 50 99 50 106
fluentd 5 64 5 61 50 26 50 22
graphql 5 84 5 85 50 56 50 56
graphql-native 5 48 5 52 50 10 50 14
lee 5 22 5 23 50 10 50 10
loops-times 5 24 5 25 50 48 50 65
matmul 5 50 5 54 50 85 50 99
nbody 5 247 5 252 50 577 50 701
nqueens 5 120 5 122 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 178 50 620 50 716
protoboeuf-encode 5 180 5 198 50 328 50 789
rack 5 590 5 631 50 950 50 1052
ruby-json 5 83 5 84 50 49 50 50
rubykon 5 20 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 169
tinygql 5 36 5 38 50 23 50 28
30k_ifelse 5 28 5 28 50 214 50 207
30k_methods 5 38 5 38 50 482 50 477
cfunc_itself 5 346 5 318 50 1147 50 1254
fib 5 127 5 132 50 909 50 933
getivar 5 207 5 312 50 2237 50 2756
keyword_args 5 107 5 94 50 1042 50 1240
object-new 5 323 5 274 50 405 50 303
respond_to 5 134 5 141 50 3258 50 3977
ruby-xor 5 220 5 240 50 803 50 1375
setivar 5 358 5 569 50 3190 50 5883
setivar_object 5 354 5 417 50 699 50 781
setivar_young 5 367 5 419 50 742 50 813
str_concat 5 400 5 424 50 967 50 1217
throw 5 1265 5 1110 50 1776 50 1413

Different Ruby configurations want different amounts of warmup. With no JIT, CRuby needs hardly any. YJIT and MJIT 3.0 both warm up quite quickly, while MJIT in 3.1 often slows down for a time as it compiles, after an unpredictable delay.

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) 1445992 1240143 209 2204 0 0% 0 0 64.563506
chunky-png (click) 309956 257389 84 1124 1 0% 0 0 33.061769
erubi-rails (click) 1906122 1596020 260 2936 19 0% 0 0 80.927704
hexapdf (click) 1452654 1322612 595 13142 40 0% 0 0 378.8305
liquid-c (click) 507336 431200 114 1743 5 0% 0 0 49.575053
liquid-compile (click) 429669 343923 146 2087 2 0% 0 0 66.88327
liquid-render (click) 578806 455256 131 2309 8 0% 0 0 65.317913
lobsters (click) 8112096 6921479 3206 52410 169 0% 0 0 1774.832547
mail (click) 759775 685875 342 5318 14 0% 0 0 154.043079
psych-load (click) 276001 242188 61 617 3 0% 0 0 19.394938
railsbench (click) 3261835 2835816 1645 16189 52 0% 0 0 464.906528
rubocop (click) 5665051 5023484 2887 50557 110 0% 4 0 1479.403043
ruby-lsp (click) 813079 671060 305 4734 24 0% 0 0 134.755373
sequel (click) 443987 406974 11 94 0 0% 0 0 3.760443
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.318525
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.244169
erubi (click) 233296 163065 5 97 0 0% 0 0 3.273084
etanni (click) 27173 26329 8 88 0 0% 0 0 3.059239
fannkuchredux (click) 23046 13626 3 249 0 0% 0 0 7.529704
fluentd (click) 375616 307789 7 93 0 0% 0 0 3.25468
graphql (click) 420911 361003 66 676 0 0% 0 0 21.12414
graphql-native (click) 393075 344451 37 255 0 0% 0 0 8.623784
lee (click) 287077 267594 45 750 0 0% 0 0 23.589756
loops-times (click) 6703 7405 5 71 0 0% 0 0 2.319653
matmul (click) 10657 3512 8 109 0 0% 0 0 3.596516
nbody (click) 13065 17086 6 172 0 0% 0 0 4.450456
nqueens (click) 20163 27348 5 239 0 0% 0 0 7.097691
optcarrot (click) 319096 242804 188 4399 34 0% 0 0 104.072987
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 41.935934
protoboeuf-encode (click) 221107 212146 14 1220 0 0% 0 0 31.343053
rack (click) 249333 212595 32 385 0 0% 0 0 10.306821
ruby-json (click) 20126 17605 9 184 0 0% 0 0 5.287037
rubykon (click) 133148 127961 137 1480 3 0% 0 0 42.403576
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.464709
tinygql (click) 283333 232914 58 762 5 0% 0 0 22.040274
30k_ifelse (click) 5658804 5284852 9259 51668 0 0% 0 0 1421.145114
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 451.467857
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.378647
fib (click) 2599 2861 3 26 0 0% 0 0 0.96806
getivar (click) 3501 4713 3 51 0 0% 0 0 1.319301
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.63846
object-new (click) 1933 2093 2 22 0 0% 0 0 0.883244
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.749218
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.890869
setivar (click) 2652 3389 3 31 0 0% 0 0 1.004876
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.147247
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.325612
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.036726
throw (click) 5848 4291 5 46 0 0% 0 0 1.633754

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.