YJIT Benchmarks

Details for Benchmarks at 2024-11-20 03:47:24 UTC

YJIT metrics from the yjit-bench suite using Ruby 86b1c83857

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 89.7% faster than CRuby 3.4.0dev
  • 5.2% faster than YJIT 3.3.6
On railsbench it is
  • 96.6% faster than CRuby 3.4.0dev
  • 4.5% faster than YJIT 3.3.6

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 154 50 161
chunky-png 5 31 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 421 5 426 50 590 50 620
liquid-compile 5 409 5 406 50 544 50 556
liquid-render 5 172 5 168 50 404 50 435
lobsters 5 20 5 20 50 10 50 10
mail 5 195 5 186 50 241 50 252
psych-load 5 10 5 10 50 10 50 10
railsbench 5 10 5 10 50 10 50 10
rubocop 5 156 5 156 50 249 50 259
ruby-lsp 5 155 5 157 50 259 50 264
sequel 5 432 5 420 50 596 50 565
binarytrees 5 84 5 84 50 144 50 152
blurhash 5 82 5 82 50 127 50 145
erubi 5 114 5 150 50 92 50 134
etanni 5 91 5 99 50 54 50 70
fannkuchredux 5 52 5 54 50 101 50 108
fluentd 5 64 5 62 50 26 50 22
graphql 5 84 5 85 50 57 50 56
graphql-native 5 40 5 53 50 10 50 15
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 48 50 84 50 97
nbody 5 249 5 248 50 577 50 682
nqueens 5 120 5 120 50 75 50 557
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 180 5 174 50 619 50 734
protoboeuf-encode 5 179 5 199 50 327 50 796
rack 5 580 5 619 50 953 50 1061
ruby-json 5 84 5 83 50 50 50 50
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 162
tinygql 5 35 5 36 50 22 50 27
30k_ifelse 5 28 5 28 50 214 50 192
30k_methods 5 39 5 38 50 481 50 473
cfunc_itself 5 342 5 334 50 1046 50 1136
fib 5 127 5 126 50 900 50 963
getivar 5 207 5 213 50 2265 50 2618
keyword_args 5 105 5 107 50 959 50 1231
object-new 5 321 5 318 50 404 50 385
respond_to 5 133 5 139 50 3255 50 4039
ruby-xor 5 241 5 246 50 804 50 1385
setivar 5 358 5 358 50 3124 50 5699
setivar_object 5 374 5 340 50 780 50 846
setivar_young 5 370 5 343 50 765 50 837
str_concat 5 402 5 392 50 963 50 1186
throw 5 1259 5 1326 50 1737 50 1747

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) 1478303 1293464 213 2351 0 0% 0 0 68.219823
chunky-png (click) 304979 280636 88 1225 17 1% 0 0 36.668547
erubi-rails (click) 1968712 1608830 263 3034 19 0% 0 0 81.959738
hexapdf (click) 1498234 1239824 599 13946 170 1% 0 0 397.752129
liquid-c (click) 496919 376516 119 1852 5 0% 0 0 51.479184
liquid-compile (click) 417764 352301 150 2210 2 0% 0 0 68.43447
liquid-render (click) 603178 485294 136 2474 12 0% 0 0 70.178518
lobsters (click) 8397475 7077696 3215 54794 188 0% 0 0 1836.532887
mail (click) 758796 697766 347 5588 57 1% 0 0 160.752949
psych-load (click) 257155 218963 65 663 17 2% 0 0 20.60817
railsbench (click) 3353630 2912214 1646 16983 52 0% 0 0 486.484391
rubocop (click) 5866172 4951423 2891 52481 110 0% 4 0 1553.452617
ruby-lsp (click) 852822 785099 309 5000 26 0% 0 0 140.033644
sequel (click) 467646 413374 16 133 58 43% 0 0 4.676589
binarytrees (click) 14303 12795 14 125 0 0% 1 0 4.522598
blurhash (click) 61812 53991 35 551 1 0% 1 0 17.555956
erubi (click) 249194 219841 8 113 0 0% 0 0 3.8087
etanni (click) 32243 30528 9 94 0 0% 0 0 3.211556
fannkuchredux (click) 28719 35080 11 307 0 0% 1 0 9.092111
fluentd (click) 381313 317687 10 109 0 0% 0 0 3.693883
graphql (click) 413781 362671 69 695 0 0% 0 0 20.436768
graphql-native (click) 370269 328096 40 270 0 0% 0 0 8.543542
lee (click) 305450 271466 49 848 17 2% 0 0 26.150063
matmul (click) 13007 5881 12 133 4 3% 0 0 4.405963
nbody (click) 19555 23574 14 246 0 0% 1 0 6.602141
nqueens (click) 22324 29548 9 261 4 1% 0 0 7.641585
optcarrot (click) 331857 315992 195 4591 38 0% 1 0 104.553419
protoboeuf (click) 167305 158566 19 1652 0 0% 1 0 47.123286
protoboeuf-encode (click) 238492 234145 21 1291 0 0% 1 0 33.400696
rack (click) 243204 229934 37 424 15 3% 0 0 11.369352
ruby-json (click) 27119 23942 10 187 0 0% 0 0 5.339802
rubykon (click) 147458 135551 144 1638 7 0% 1 0 46.590839
sudoku (click) 48458 36262 10 544 7 1% 0 0 16.176878
tinygql (click) 273480 209551 62 795 20 2% 0 0 22.973674
30k_ifelse (click) 6316839 5792957 9263 56487 0 0% 1 0 1546.800677
30k_methods (click) 2240242 1597953 5786 19409 0 0% 1 0 450.742198
cfunc_itself (click) 11593 9808 13 112 0 0% 1 0 3.51005
fib (click) 8722 8374 11 87 0 0% 1 0 2.95017
getivar (click) 9718 10268 12 114 0 0% 1 0 3.401265
keyword_args (click) 12318 10276 13 110 0 0% 1 0 3.607508
object-new (click) 8145 7709 11 85 1 1% 1 0 2.899853
respond_to (click) 13998 6288 12 145 0 0% 1 0 4.269729
ruby-xor (click) 10978 11066 12 122 2 1% 1 0 3.713336
setivar (click) 8869 8944 12 94 0 0% 1 0 3.064216
setivar_object (click) 9398 9092 12 96 0 0% 1 0 3.210388
setivar_young (click) 10108 9814 13 104 0 0% 1 0 3.418668
str_concat (click) 12327 12217 15 131 3 2% 1 0 4.27177
throw (click) 12065 9846 14 109 0 0% 1 0 3.682479

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.