YJIT Benchmarks

Details for Benchmarks at 2024-11-26 03:48:09 UTC

YJIT metrics from the yjit-bench suite using Ruby 8655b9f7c6.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.5% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.6
On railsbench it is
  • 95.3% faster than CRuby 3.4.0dev
  • 4.7% 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 82 5 83 50 156 50 161
chunky-png 5 31 5 32 50 15 50 34
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 420 5 428 50 590 50 620
liquid-compile 5 407 5 410 50 548 50 556
liquid-render 5 172 5 169 50 404 50 437
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 189 50 251 50 251
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 155 50 250 50 258
ruby-lsp 5 157 5 140 50 242 50 199
sequel 5 429 5 418 50 571 50 578
binarytrees 5 84 5 80 50 144 50 142
blurhash 5 82 5 82 50 127 50 145
erubi 5 115 5 149 50 99 50 147
etanni 5 90 5 99 50 54 50 70
fannkuchredux 5 52 5 55 50 101 50 108
fluentd 5 63 5 61 50 24 50 27
graphql 5 84 5 85 50 57 50 58
graphql-native 5 40 5 52 50 10 50 14
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 52 50 84 50 99
nbody 5 249 5 250 50 577 50 714
nqueens 5 120 5 119 50 75 50 564
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 173 50 620 50 734
protoboeuf-encode 5 180 5 199 50 325 50 803
rack 5 582 5 627 50 954 50 1028
ruby-json 5 83 5 84 50 49 50 51
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 172
tinygql 5 36 5 36 50 23 50 28
30k_ifelse 5 28 5 28 50 214 50 193
30k_methods 5 38 5 38 50 476 50 477
cfunc_itself 5 341 5 338 50 1046 50 1136
fib 5 126 5 127 50 901 50 963
getivar 5 207 5 213 50 2250 50 2616
keyword_args 5 105 5 108 50 959 50 1231
object-new 5 320 5 309 50 404 50 378
respond_to 5 133 5 138 50 3253 50 4044
ruby-xor 5 242 5 245 50 803 50 1378
setivar 5 358 5 358 50 3123 50 5705
setivar_object 5 374 5 340 50 782 50 843
setivar_young 5 373 5 343 50 768 50 852
str_concat 5 402 5 385 50 965 50 1177
throw 5 1259 5 1301 50 1737 50 1660

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) 1462977 1268936 213 2351 0 0% 0 0 68.474571
chunky-png (click) 316249 287764 88 1225 17 1% 0 0 36.803704
erubi-rails (click) 1964348 1645018 263 3070 19 0% 0 0 83.235156
hexapdf (click) 1507719 1317825 599 13946 174 1% 0 0 397.10136
liquid-c (click) 498175 434815 119 1852 5 0% 0 0 51.639404
liquid-compile (click) 423647 359224 150 2212 2 0% 0 0 68.753746
liquid-render (click) 613346 527455 136 2474 12 0% 0 0 69.598049
lobsters (click) 8408855 7044459 3215 54798 188 0% 0 0 1865.825966
mail (click) 789264 715427 347 5588 57 1% 0 0 162.088065
psych-load (click) 263402 240411 65 661 17 2% 0 0 20.798845
railsbench (click) 3363088 2706030 1646 16989 52 0% 0 0 490.425283
rubocop (click) 5864348 5024146 2891 52447 110 0% 4 0 1532.488242
ruby-lsp (click) 855686 704083 309 5000 26 0% 0 0 143.876826
sequel (click) 478339 422501 16 129 58 44% 0 0 4.840264
binarytrees (click) 10796 9798 10 89 0 0% 0 0 3.515828
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.696241
erubi (click) 236371 209369 8 113 0 0% 0 0 3.841146
etanni (click) 28736 27536 10 98 0 0% 0 0 3.349467
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.156591
fluentd (click) 381313 342267 10 109 0 0% 0 0 3.74051
graphql (click) 430186 347729 69 695 0 0% 0 0 21.823443
graphql-native (click) 396528 343113 40 270 0 0% 0 0 9.110138
lee (click) 289753 247501 49 848 17 2% 0 0 26.19464
matmul (click) 13007 5881 12 133 4 3% 0 0 4.361147
nbody (click) 19555 23574 14 246 0 0% 1 0 6.635699
nqueens (click) 22324 29548 9 261 4 1% 0 0 7.793948
optcarrot (click) 328350 312990 191 4555 38 0% 0 0 107.689338
protoboeuf (click) 163798 155564 15 1616 0 0% 0 0 46.16176
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.544736
rack (click) 247599 205245 37 424 16 3% 0 0 11.35377
ruby-json (click) 27045 23855 10 188 0 0% 0 0 5.368418
rubykon (click) 144361 141117 140 1606 7 0% 0 0 46.401
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.351849
tinygql (click) 283318 258350 62 795 20 2% 0 0 22.795165
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1565.71409
30k_methods (click) 2236735 1594956 5782 19373 0 0% 0 0 452.569845
cfunc_itself (click) 8081 6806 9 76 0 0% 0 0 2.530229
fib (click) 5210 5372 7 51 0 0% 0 0 1.989266
getivar (click) 9718 10268 12 114 0 0% 1 0 3.422599
keyword_args (click) 8811 7279 9 74 0 0% 0 0 2.564939
object-new (click) 8145 7709 11 85 1 1% 1 0 2.858348
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.261945
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.763078
setivar (click) 8869 8944 12 94 0 0% 1 0 3.06493
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.192629
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.40193
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.299005
throw (click) 12065 9846 14 109 0 0% 1 0 3.613938

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.