YJIT Benchmarks

Details for Benchmarks at 2024-11-27 03:48:40 UTC

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

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 88.5% faster than CRuby 3.4.0dev
  • 4.1% faster than YJIT 3.3.6
On railsbench it is
  • 94.5% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.6
x86_64 runtime: 3 hours, 44 minutes
aarch64 runtime: 3 hours, 11 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 82 50 151 50 165
chunky-png 5 31 5 33 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 406 5 425 50 588 50 624
liquid-compile 5 411 5 408 50 551 50 556
liquid-render 5 171 5 169 50 404 50 424
lobsters 5 20 5 20 50 10 50 10
mail 5 189 5 193 50 251 50 240
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 262
ruby-lsp 5 155 5 157 50 259 50 242
sequel 5 433 5 417 50 600 50 585
binarytrees 5 84 5 82 50 144 50 141
blurhash 5 82 5 83 50 127 50 145
erubi 5 75 5 148 50 98 50 138
etanni 5 91 5 97 50 54 50 70
fannkuchredux 5 52 5 54 50 101 50 106
fluentd 5 64 5 62 50 26 50 21
graphql 5 85 5 87 50 57 50 57
graphql-native 5 49 5 53 50 10 50 15
lee 5 22 5 23 50 10 50 10
matmul 5 51 5 53 50 84 50 99
nbody 5 249 5 249 50 577 50 715
nqueens 5 120 5 121 50 75 50 567
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 179 5 173 50 620 50 748
protoboeuf-encode 5 179 5 198 50 327 50 807
rack 5 576 5 629 50 948 50 1037
ruby-json 5 84 5 85 50 50 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 171
tinygql 5 36 5 36 50 23 50 26
30k_ifelse 5 28 5 28 50 214 50 194
30k_methods 5 39 5 38 50 483 50 476
cfunc_itself 5 342 5 329 50 1046 50 1135
fib 5 126 5 128 50 900 50 962
getivar 5 207 5 219 50 2264 50 2628
keyword_args 5 95 5 102 50 959 50 1231
object-new 5 321 5 310 50 404 50 372
respond_to 5 133 5 137 50 3254 50 3997
ruby-xor 5 241 5 248 50 804 50 1380
setivar 5 358 5 357 50 3129 50 5712
setivar_object 5 374 5 341 50 782 50 843
setivar_young 5 373 5 350 50 767 50 853
str_concat 5 402 5 390 50 965 50 1196
throw 5 1260 5 1307 50 1731 50 1694

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) 1496709 1259507 213 2351 0 0% 0 0 68.308652
chunky-png (click) 313745 271473 88 1225 17 1% 0 0 36.926856
erubi-rails (click) 1966706 1657116 263 3046 19 0% 0 0 82.846186
hexapdf (click) 1509672 1368745 599 13991 172 1% 0 0 404.611735
liquid-c (click) 495796 426868 118 1846 5 0% 0 0 52.070661
liquid-compile (click) 419081 362973 150 2209 2 0% 0 0 69.282926
liquid-render (click) 606832 517699 135 2468 12 0% 0 0 69.760182
lobsters (click) 8412970 7121169 3215 54903 189 0% 0 0 1892.333274
mail (click) 759004 672997 347 5588 57 1% 0 0 161.848799
psych-load (click) 263179 215709 65 661 17 2% 0 0 20.792061
railsbench (click) 3368157 2899974 1646 17065 52 0% 0 0 489.97858
rubocop (click) 5861518 5052166 2891 52412 110 0% 4 0 1543.246458
ruby-lsp (click) 860833 742119 309 5005 26 0% 0 0 142.590618
sequel (click) 496294 396645 16 133 57 42% 0 0 4.941932
binarytrees (click) 10796 9798 10 89 0 0% 0 0 3.560647
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.681628
erubi (click) 246458 218433 8 113 0 0% 0 0 3.841592
etanni (click) 32243 30528 9 94 0 0% 0 0 3.218061
fannkuchredux (click) 25207 32078 7 271 0 0% 0 0 8.208531
fluentd (click) 382483 302258 10 109 0 0% 0 0 3.75252
graphql (click) 413779 370810 69 695 0 0% 0 0 21.922884
graphql-native (click) 383432 314692 40 270 0 0% 0 0 9.110801
lee (click) 289198 245714 49 848 16 1% 0 0 26.573554
matmul (click) 16519 8883 16 169 4 2% 1 0 5.470339
nbody (click) 19555 23574 14 246 0 0% 1 0 6.683763
nqueens (click) 25836 32550 13 297 4 1% 1 0 8.73253
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 108.165231
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.591828
protoboeuf-encode (click) 234990 231148 17 1255 0 0% 0 0 32.473862
rack (click) 250542 222936 37 424 16 3% 0 0 11.414903
ruby-json (click) 25474 21941 10 187 0 0% 0 0 5.383837
rubykon (click) 147863 144114 144 1642 7 0% 1 0 47.28227
sudoku (click) 51960 39259 14 580 7 1% 1 0 17.391128
tinygql (click) 272109 239023 62 795 17 2% 0 0 22.881902
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1563.879477
30k_methods (click) 2236735 1594956 5782 19373 0 0% 0 0 455.697783
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.538852
fib (click) 5210 5372 7 51 0 0% 0 0 2.031927
getivar (click) 9718 10268 12 114 0 0% 1 0 3.430812
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.678201
object-new (click) 8145 7709 11 85 1 1% 1 0 2.823608
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.279933
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.6974
setivar (click) 8869 8944 12 94 0 0% 1 0 3.154574
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.178727
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.397602
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.260519
throw (click) 12065 9846 14 109 0 0% 1 0 3.91212

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.