YJIT Benchmarks

Details for Benchmarks at 2025-04-24 03:49:14 UTC

YJIT metrics from the yjit-bench suite using Ruby f0dda0534b.

Using the geomean of the headline benchmarks for x86 YJIT 3.5.0dev is
  • 85.6% faster than CRuby 3.5.0dev
  • 6.3% faster than YJIT 3.3.6
On railsbench it is
  • 104.7% faster than CRuby 3.5.0dev
  • 5.0% faster than YJIT 3.3.6
x86_64 runtime: 4 hours, 11 minutes
aarch64 runtime: 3 hours, 35 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 83 50 157 50 158
chunky-png 5 32 5 34 50 15 50 33
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 427 50 588 50 617
liquid-compile 5 409 5 461 50 537 50 670
liquid-render 5 171 5 169 50 405 50 433
mail 5 195 5 178 50 238 50 214
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 158 50 252 50 269
ruby-lsp 5 155 5 164 50 260 50 269
sequel 5 430 5 427 50 571 50 591
binarytrees 5 84 5 85 50 149 50 136
blurhash 5 82 5 89 50 127 50 145
erubi 5 115 5 140 50 99 50 121
etanni 5 90 5 100 50 54 50 68
fannkuchredux 5 52 5 57 50 99 50 106
fluentd 5 63 5 63 50 25 50 29
graphql 5 85 5 88 50 56 50 54
graphql-native 5 40 5 53 50 10 50 12
lee 5 22 5 25 50 10 50 10
matmul 5 51 5 59 50 85 50 96
nbody 5 248 5 336 50 578 50 683
nqueens 5 120 5 125 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 175 5 188 50 620 50 739
protoboeuf-encode 5 178 5 210 50 326 50 840
rack 5 594 5 614 50 955 50 1034
ruby-json 5 84 5 83 50 50 50 50
rubyboy 5 10 5 10 50 10 50 10
rubykon 5 21 5 22 50 10 50 10
sudoku 5 48 5 50 50 164 50 161
tinygql 5 36 5 37 50 23 50 26
30k_ifelse 5 28 5 28 50 215 50 206
30k_methods 5 38 5 38 50 478 50 476
cfunc_itself 5 345 5 354 50 1147 50 1258
fib 5 125 5 145 50 910 50 933
getivar 5 207 5 304 50 2239 50 2737
keyword_args 5 107 5 101 50 1042 50 1244
loops-times 5 24 5 24 50 48 50 65
object-new 5 323 5 325 50 405 50 385
respond_to 5 134 5 137 50 3259 50 3980
ruby-xor 5 241 5 257 50 802 50 1375
setivar 5 358 5 579 50 3197 50 5895
setivar_object 5 354 5 480 50 714 50 791
setivar_young 5 365 5 480 50 746 50 809
str_concat 5 398 5 461 50 969 50 1237
throw 5 1264 5 1259 50 1775 50 1689

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) 1426025 1231767 209 2202 0 0% 0 0 64.027284
chunky-png (click) 295110 261883 84 1129 1 0% 0 0 33.984927
hexapdf (click) 1441160 1182828 595 13145 41 0% 0 0 380.228701
liquid-c (click) 470989 378044 115 1744 5 0% 0 0 48.887877
liquid-compile (click) 396808 350929 146 2081 2 0% 0 0 65.439392
liquid-render (click) 582247 486558 132 2310 8 0% 0 0 64.84473
mail (click) 730264 628946 342 5317 14 0% 0 0 154.883436
psych-load (click) 249031 218761 61 617 3 0% 0 0 19.4048
railsbench (click) 3240639 2781605 1645 16212 52 0% 0 0 468.593362
rubocop (click) 5681212 4861799 2887 50559 110 0% 4 0 1578.56463
ruby-lsp (click) 810974 679141 305 4732 24 0% 0 0 135.029761
sequel (click) 483542 407962 11 94 0 0% 0 0 3.493053
binarytrees (click) 7093 6143 6 52 0 0% 0 0 2.243239
blurhash (click) 50118 50863 27 438 0 0% 0 0 14.245328
erubi (click) 231062 204720 5 97 0 0% 0 0 3.241706
etanni (click) 30101 29597 8 88 0 0% 0 0 2.976276
fannkuchredux (click) 23031 13626 3 249 0 0% 0 0 7.382057
fluentd (click) 357343 301182 7 93 0 0% 0 0 3.189661
graphql (click) 403875 379852 66 676 0 0% 0 0 20.628759
graphql-native (click) 369667 327756 37 255 0 0% 0 0 8.05045
lee (click) 275601 234013 45 749 0 0% 0 0 23.429581
matmul (click) 10657 3512 8 109 0 0% 0 0 3.566223
nbody (click) 13050 17086 6 172 0 0% 0 0 4.474917
nqueens (click) 20163 27348 5 239 0 0% 0 0 6.850289
optcarrot (click) 318856 234467 188 4395 34 0% 0 0 100.489384
protoboeuf (click) 150678 129601 12 1479 0 0% 0 0 42.222685
protoboeuf-encode (click) 221062 212146 14 1220 0 0% 0 0 31.545327
rack (click) 241897 222950 32 385 0 0% 0 0 10.377379
ruby-json (click) 20456 18007 8 178 0 0% 0 0 5.033175
rubyboy (click) 660860 589246 177 5805 40 0% 0 0 143.65899
rubykon (click) 133501 111856 137 1482 3 0% 0 0 42.564415
sudoku (click) 45311 40871 7 516 0 0% 0 0 15.420685
tinygql (click) 270662 223690 58 762 5 0% 0 0 21.626381
30k_ifelse (click) 5658774 5284843 9259 51667 0 0% 0 0 1429.919962
30k_methods (click) 2234569 1592883 5778 19351 0 0% 0 0 456.768014
cfunc_itself (click) 5130 4086 4 47 0 0% 0 0 1.336957
fib (click) 2599 2861 3 26 0 0% 0 0 0.97449
getivar (click) 3501 4713 3 51 0 0% 0 0 1.344566
keyword_args (click) 6320 4813 5 49 0 0% 0 0 1.609572
loops-times (click) 6688 7405 5 70 0 0% 0 0 2.318313
object-new (click) 1918 2093 2 22 0 0% 0 0 0.829807
respond_to (click) 5868 6227 4 62 0 0% 0 0 1.720114
ruby-xor (click) 5331 6009 4 64 0 0% 0 0 1.914248
setivar (click) 2652 3389 3 31 0 0% 0 0 0.985053
setivar_object (click) 3181 3537 3 33 0 0% 0 0 1.108696
setivar_young (click) 3891 4259 4 41 0 0% 0 0 1.327385
str_concat (click) 5469 6016 6 62 0 0% 0 0 2.01773
throw (click) 5848 4291 5 46 0 0% 0 0 1.602752

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.