YJIT Benchmarks

Details for Benchmarks at 2024-11-22 03:47:44 UTC

YJIT metrics from the yjit-bench suite using Ruby 4e01878bad.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 90.6% faster than CRuby 3.4.0dev
  • 6.9% faster than YJIT 3.3.6
On railsbench it is
  • 97.3% faster than CRuby 3.4.0dev
  • 6.5% 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 149 50 165
chunky-png 5 32 5 32 50 15 50 34
erubi-rails 5 16 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 406 5 417 50 565 50 613
liquid-compile 5 410 5 411 50 543 50 592
liquid-render 5 172 5 168 50 406 50 433
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 188 50 241 50 246
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 249 50 265
ruby-lsp 5 158 5 153 50 241 50 250
sequel 5 422 5 416 50 572 50 585
binarytrees 5 84 5 82 50 144 50 151
blurhash 5 82 5 80 50 127 50 145
erubi 5 75 5 150 50 92 50 148
etanni 5 91 5 99 50 54 50 70
fannkuchredux 5 51 5 55 50 101 50 108
fluentd 5 63 5 64 50 26 50 30
graphql 5 84 5 84 50 56 50 56
graphql-native 5 49 5 52 50 10 50 14
lee 5 22 5 22 50 10 50 10
matmul 5 51 5 49 50 84 50 100
nbody 5 249 5 245 50 577 50 716
nqueens 5 120 5 117 50 75 50 565
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 178 5 174 50 619 50 730
protoboeuf-encode 5 178 5 198 50 326 50 818
rack 5 589 5 627 50 951 50 1080
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 22 50 26
30k_ifelse 5 28 5 28 50 215 50 194
30k_methods 5 38 5 38 50 482 50 477
cfunc_itself 5 341 5 338 50 1046 50 1136
fib 5 127 5 126 50 900 50 963
getivar 5 207 5 219 50 2267 50 2633
keyword_args 5 105 5 104 50 959 50 1231
object-new 5 321 5 321 50 404 50 395
respond_to 5 133 5 138 50 3253 50 4038
ruby-xor 5 242 5 243 50 804 50 1383
setivar 5 358 5 358 50 3123 50 5710
setivar_object 5 373 5 340 50 782 50 842
setivar_young 5 373 5 344 50 767 50 862
str_concat 5 405 5 391 50 966 50 1194
throw 5 1261 5 1311 50 1742 50 1740

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) 1468930 1282362 213 2351 0 0% 0 0 68.756685
chunky-png (click) 303017 280179 88 1225 17 1% 0 0 36.400555
erubi-rails (click) 1968172 1657755 263 3099 19 0% 0 0 87.826404
hexapdf (click) 1495138 1335122 600 13951 169 1% 0 0 396.399371
liquid-c (click) 489962 374561 119 1852 5 0% 0 0 51.828156
liquid-compile (click) 436005 378416 150 2202 2 0% 0 0 67.216231
liquid-render (click) 607325 518227 136 2474 12 0% 0 0 70.01164
lobsters (click) 8408504 7144594 3215 54870 190 0% 0 0 1876.040197
mail (click) 757811 697410 347 5600 57 1% 0 0 165.804744
psych-load (click) 247412 211424 65 661 17 2% 0 0 20.682946
railsbench (click) 3361625 2860933 1646 16995 52 0% 0 0 486.824305
rubocop (click) 5854526 5053573 2891 52379 110 0% 4 0 1522.776102
ruby-lsp (click) 879373 793122 309 5004 26 0% 0 0 140.844257
sequel (click) 473997 401536 16 125 54 43% 0 0 4.697268
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.534964
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.716807
erubi (click) 239676 219061 8 113 0 0% 0 0 3.766855
etanni (click) 32243 30528 9 94 0 0% 0 0 3.242191
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.19534
fluentd (click) 381720 334448 10 109 0 0% 0 0 3.818417
graphql (click) 416394 393046 69 695 0 0% 0 0 21.621181
graphql-native (click) 375291 342606 40 270 0 0% 0 0 9.1523
lee (click) 295834 247910 49 848 17 2% 0 0 26.22681
matmul (click) 16519 8883 16 169 4 2% 1 0 5.464521
nbody (click) 19555 23574 14 246 0 0% 1 0 6.658027
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.730035
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 107.381593
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 46.990883
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.304678
rack (click) 238011 204905 37 424 16 3% 0 0 11.433333
ruby-json (click) 27078 23913 10 187 0 0% 0 0 5.363388
rubykon (click) 146625 126486 144 1630 7 0% 1 0 46.835544
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.34054
tinygql (click) 283687 250715 62 795 20 2% 0 0 22.752641
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1560.344842
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 452.948259
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.498845
fib (click) 8722 8374 11 87 0 0% 1 0 2.948887
getivar (click) 9718 10268 12 114 0 0% 1 0 3.392891
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.608375
object-new (click) 8145 7709 11 85 1 1% 1 0 2.900887
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.263679
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.771927
setivar (click) 8869 8944 12 94 0 0% 1 0 3.119434
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.215963
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.4011
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.270869
throw (click) 12065 9846 14 109 0 0% 1 0 3.691875

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.