YJIT Benchmarks

Details for Benchmarks at 2024-11-28 03:48:32 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 86.3% faster than CRuby 3.4.0dev
  • 3.0% faster than YJIT 3.3.6
On railsbench it is
  • 92.8% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.6
x86_64 runtime: 3 hours, 44 minutes
aarch64 runtime: 3 hours, 12 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.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.6 warmups YJIT 3.3.6 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 5 83 5 83 50 157 50 158
chunky-png 5 31 5 33 50 15 50 35
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 421 5 426 50 567 50 624
liquid-compile 5 417 5 422 50 542 50 556
liquid-render 5 170 5 170 50 405 50 412
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 194 50 236 50 243
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 154 50 250 50 263
ruby-lsp 5 155 5 140 50 258 50 199
sequel 5 432 5 420 50 599 50 560
binarytrees 5 83 5 82 50 144 50 141
blurhash 5 82 5 83 50 127 50 145
erubi 5 114 5 140 50 85 50 142
etanni 5 91 5 98 50 54 50 70
fannkuchredux 5 52 5 55 50 101 50 106
fluentd 5 63 5 64 50 24 50 30
graphql 5 85 5 85 50 57 50 57
graphql-native 5 40 5 53 50 10 50 13
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 51 50 84 50 97
nbody 5 248 5 248 50 577 50 713
nqueens 5 120 5 121 50 75 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 173 50 620 50 745
protoboeuf-encode 5 179 5 195 50 326 50 818
rack 5 575 5 625 50 945 50 1071
ruby-json 5 83 5 84 50 49 50 52
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 49 50 164 50 161
tinygql 5 35 5 37 50 23 50 25
30k_ifelse 5 28 5 28 50 215 50 193
30k_methods 5 38 5 38 50 483 50 477
cfunc_itself 5 341 5 330 50 1046 50 1135
fib 5 126 5 128 50 900 50 963
getivar 5 207 5 220 50 2264 50 2628
keyword_args 5 105 5 103 50 959 50 1231
object-new 5 321 5 310 50 404 50 379
respond_to 5 133 5 138 50 3253 50 4038
ruby-xor 5 238 5 247 50 803 50 1381
setivar 5 358 5 358 50 3124 50 5705
setivar_object 5 374 5 340 50 780 50 842
setivar_young 5 373 5 344 50 766 50 853
str_concat 5 402 5 392 50 964 50 1205
throw 5 1259 5 1314 50 1738 50 1702

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) 1490371 1328058 213 2351 0 0% 0 0 68.236999
chunky-png (click) 342458 296317 88 1225 17 1% 0 0 36.258578
erubi-rails (click) 1996849 1739396 264 3086 19 0% 0 0 85.218273
hexapdf (click) 1534641 1352000 600 13991 174 1% 0 0 404.131695
liquid-c (click) 497485 434250 118 1846 5 0% 0 0 51.452539
liquid-compile (click) 446160 402826 150 2220 2 0% 0 0 68.361807
liquid-render (click) 636997 546816 135 2468 12 0% 0 0 69.972467
lobsters (click) 8391157 7096329 3214 54773 190 0% 0 0 1888.571686
mail (click) 794168 711251 347 5588 57 1% 0 0 162.004729
psych-load (click) 258373 236681 65 663 17 2% 0 0 20.665593
railsbench (click) 3363174 2862398 1646 17043 52 0% 0 0 492.346858
rubocop (click) 5857624 5081291 2891 52384 110 0% 4 0 1528.02125
ruby-lsp (click) 890079 769267 309 5004 26 0% 0 0 143.198751
sequel (click) 496984 397618 16 125 57 45% 0 0 4.585265
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.485358
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.735819
erubi (click) 262092 230262 8 113 0 0% 0 0 3.94637
etanni (click) 32243 30528 9 94 0 0% 0 0 3.20733
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.225522
fluentd (click) 351716 299995 10 109 0 0% 0 0 3.879055
graphql (click) 412483 348655 69 695 0 0% 0 0 21.569555
graphql-native (click) 370109 311391 40 270 0 0% 0 0 9.206622
lee (click) 315162 237866 49 848 17 2% 0 0 26.320798
matmul (click) 16519 8883 16 169 4 2% 1 0 5.505442
nbody (click) 19555 23574 14 246 0 0% 1 0 6.635898
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.774463
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 104.758699
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.481336
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.37332
rack (click) 273320 234216 37 424 16 3% 0 0 11.390891
ruby-json (click) 26018 22426 11 192 0 0% 0 0 5.549936
rubykon (click) 146229 126207 144 1628 7 0% 1 0 47.02126
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.436754
tinygql (click) 277521 245758 62 795 20 2% 0 0 22.916898
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1565.61322
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 455.911582
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.487554
fib (click) 8722 8374 11 87 0 0% 1 0 3.006918
getivar (click) 9718 10268 12 114 0 0% 1 0 3.448614
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.613208
object-new (click) 8145 7709 11 85 1 1% 1 0 2.891847
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.299713
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.72543
setivar (click) 8869 8944 12 94 0 0% 1 0 3.120699
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.23064
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.560646
str_concat (click) 8820 9220 11 95 3 3% 0 0 3.203901
throw (click) 12065 9846 14 109 0 0% 1 0 3.720879

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.