YJIT Benchmarks

Details for Benchmarks at 2024-09-23 00:19:37 UTC

YJIT metrics from the yjit-bench suite using Ruby b811a9a097

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.6% faster than CRuby 3.4.0dev
  • 3.0% faster than YJIT 3.3.4
On railsbench it is
  • 75.7% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.4

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.4 warmups CRuby 3.3.4 iters CRuby 3.4.0dev warmups CRuby 3.4.0dev iters YJIT 3.3.4 warmups YJIT 3.3.4 iters YJIT 3.4.0dev warmups YJIT 3.4.0dev iters
activerecord 10 56 10 58 10 146 10 151
chunky-png 10 18 10 17 10 35 10 40
erubi-rails 10 10 10 10 10 23 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 347 10 486 10 512
liquid-compile 10 345 10 346 10 498 10 509
liquid-render 10 137 10 133 10 354 10 362
lobsters 10 13 10 13 10 24 10 23
mail 10 162 10 159 10 237 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 128 10 126 10 216 10 224
sequel 10 324 10 321 10 438 10 439
binarytrees 10 51 10 50 10 118 10 111
blurhash 10 62 10 63 10 120 10 143
erubi 10 79 10 101 10 105 10 129
etanni 10 60 10 69 10 69 10 81
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 30 10 40 10 33 10 47
lee 10 11 10 11 10 20 10 20
matmul 10 10 10 10 10 15 10 17
nbody 10 203 10 204 10 421 10 529
nqueens 10 114 10 115 10 113 10 423
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 157 10 153 10 582 10 635
protoboeuf-encode 10 132 10 165 10 294 10 663
rack 10 464 10 487 10 831 10 923
ruby-json 10 10 10 10 10 10 10 10
rubykon 10 10 10 10 10 10 10 10
sudoku 10 10 10 10 10 28 10 29
tinygql 10 23 10 23 10 40 10 53
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 246 10 264 10 1108 10 1211
fib 10 102 10 98 10 616 10 623
getivar 10 214 10 231 10 1250 10 1739
keyword_args 10 85 10 89 10 730 10 947
object-new 10 228 10 188 10 308 10 229
respond_to 10 91 10 88 10 1785 10 2216
ruby-xor 10 30 10 31 10 92 10 168
setivar 10 348 10 393 10 2319 10 3110
setivar_object 10 216 10 221 10 536 10 482
setivar_young 10 219 10 222 10 528 10 476
str_concat 10 319 10 344 10 658 10 660
throw 10 971 10 819 10 1345 10 1037

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) 1482698 1275455 214 2301 0 0% 0 0 80.710001
chunky-png (click) 320350 280808 82 1095 1 0% 0 0 37.728842
erubi-rails (click) 1922911 1659661 245 2816 8 0% 0 0 90.88675
hexapdf (click) 1359707 1172911 507 12572 40 0% 0 0 430.61262
liquid-c (click) 490838 448207 119 1859 5 0% 0 0 60.3728
liquid-compile (click) 411993 369093 150 2210 2 0% 0 0 81.019797
liquid-render (click) 598386 480598 136 2473 12 0% 0 0 81.346951
lobsters (click) 8061061 6867577 3087 51799 181 0% 0 0 2066.286625
mail (click) 750005 707987 346 5489 16 0% 0 0 188.401324
psych-load (click) 250268 208153 60 613 3 0% 0 0 22.255468
railsbench (click) 3299737 2809865 1631 16671 41 0% 0 0 562.216188
ruby-lsp (click) 887064 797692 308 4991 26 0% 0 0 168.971092
sequel (click) 469820 410679 15 118 0 0% 0 0 4.849359
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.419124
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.787041
erubi (click) 221232 200382 9 108 0 0% 0 0 4.118631
etanni (click) 28241 26371 10 86 0 0% 0 0 3.311185
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.190875
fluentd (click) 366030 300336 3 22 0 0% 0 0 0.99105
graphql (click) 391885 306204 65 651 0 0% 0 0 22.781174
graphql-native (click) 358669 307268 41 275 0 0% 0 0 10.221608
lee (click) 250915 216036 33 567 0 0% 0 0 20.627882
matmul (click) 7323 8338 6 76 0 0% 0 0 2.982242
nbody (click) 15428 19810 9 201 0 0% 0 0 6.333737
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.568029
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.740094
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.110137
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.679334
rack (click) 228035 203203 36 417 0 0% 0 0 13.081013
ruby-json (click) 24330 21342 6 159 0 0% 0 0 5.257638
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.788835
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.621568
tinygql (click) 273854 232197 57 743 5 0% 0 0 24.558249
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1922.932683
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 550.73288
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.25248
fib (click) 4585 4605 6 42 0 0% 0 0 1.84231
getivar (click) 5037 6014 6 64 0 0% 0 0 2.187683
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.583689
object-new (click) 3469 3394 5 35 0 0% 0 0 1.583164
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.506576
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.812364
setivar (click) 4188 4690 6 44 0 0% 0 0 1.713178
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.826955
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.071289
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.233202
throw (click) 7384 5592 8 59 0 0% 0 0 2.348426

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.