YJIT Benchmarks

Details for Benchmarks at 2024-11-07 03:44:52 UTC

YJIT metrics from the yjit-bench suite using Ruby 0193f6c288

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 87.1% faster than CRuby 3.4.0dev
  • 3.9% faster than YJIT 3.3.4
On railsbench it is
  • 97.3% faster than CRuby 3.4.0dev
  • 3.5% faster than 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 5 83 5 83 50 157 50 159
chunky-png 5 31 5 32 50 14 50 20
erubi-rails 5 15 5 15 50 10 50 10
hexapdf 5 10 5 10 50 10 50 10
liquid-c 5 423 5 426 50 593 50 623
liquid-compile 5 411 5 407 50 547 50 554
liquid-render 5 171 5 167 50 403 50 425
lobsters 5 20 5 20 50 10 50 10
mail 5 188 5 186 50 238 50 238
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 248 50 264
ruby-lsp 5 155 5 157 50 247 50 260
sequel 5 416 5 420 50 594 50 564
binarytrees 5 84 5 84 50 146 50 149
blurhash 5 82 5 83 50 128 50 145
erubi 5 112 5 149 50 86 50 125
etanni 5 90 5 98 50 52 50 62
fannkuchredux 5 52 5 55 50 101 50 108
fluentd 5 62 5 63 50 23 50 32
graphql 5 85 5 86 50 57 50 56
graphql-native 5 40 5 51 50 10 50 13
lee 5 23 5 22 50 10 50 10
matmul 5 51 5 53 50 88 50 100
nbody 5 248 5 261 50 595 50 708
nqueens 5 119 5 119 50 74 50 563
optcarrot 5 10 5 10 50 10 50 10
protoboeuf 5 173 5 176 50 616 50 749
protoboeuf-encode 5 179 5 199 50 326 50 786
rack 5 576 5 630 50 952 50 1082
ruby-json 5 84 5 83 50 50 50 49
rubykon 5 21 5 21 50 10 50 10
sudoku 5 48 5 48 50 164 50 160
tinygql 5 36 5 37 50 24 50 25
30k_ifelse 5 28 5 28 50 214 50 192
30k_methods 5 39 5 38 50 480 50 477
cfunc_itself 5 347 5 337 50 1046 50 1135
fib 5 127 5 126 50 900 50 962
getivar 5 206 5 214 50 2267 50 2617
keyword_args 5 108 5 105 50 959 50 1231
object-new 5 322 5 274 50 407 50 313
respond_to 5 137 5 138 50 3258 50 4039
ruby-xor 5 242 5 245 50 803 50 1380
setivar 5 361 5 365 50 3126 50 5717
setivar_object 5 372 5 344 50 763 50 846
setivar_young 5 372 5 347 50 771 50 848
str_concat 5 398 5 403 50 990 50 1182
throw 5 1267 5 1334 50 1719 50 1741

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) 1445802 1255204 213 2296 0 0% 0 0 66.31002
chunky-png (click) 296767 259418 86 1133 1 0% 0 0 34.386458
erubi-rails (click) 1915862 1593737 249 2865 8 0% 0 0 78.228263
hexapdf (click) 1494256 1315786 597 13848 40 0% 0 0 394.860152
liquid-c (click) 521727 465292 119 1852 5 0% 0 0 52.649068
liquid-compile (click) 441582 364377 150 2198 2 0% 0 0 66.981542
liquid-render (click) 601141 455032 136 2466 12 0% 0 0 68.839715
lobsters (click) 8330926 6900041 3214 54333 181 0% 0 0 1829.863863
mail (click) 754903 704747 346 5481 16 0% 0 0 158.689158
psych-load (click) 286796 226939 64 656 3 0% 0 0 20.524191
railsbench (click) 3308001 2785073 1633 16708 41 0% 0 0 475.786992
rubocop (click) 5830116 4990454 2891 52116 110 0% 4 0 1512.770235
ruby-lsp (click) 851560 721918 308 4986 26 0% 0 0 141.56165
sequel (click) 462517 420526 15 118 0 0% 0 0 4.22173
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.065057
blurhash (click) 57136 49713 29 501 0 0% 0 0 16.127991
erubi (click) 226909 203849 9 108 0 0% 0 0 3.578614
etanni (click) 24125 22834 10 89 0 0% 0 0 3.033203
fannkuchredux (click) 24038 30826 5 257 0 0% 0 0 7.695775
fluentd (click) 344872 268818 10 109 0 0% 0 0 3.81135
graphql (click) 397046 344857 69 695 0 0% 0 0 20.576347
graphql-native (click) 365806 301860 40 270 0 0% 0 0 8.559297
lee (click) 278705 227021 48 803 0 0% 0 0 24.620849
matmul (click) 11838 4563 10 119 0 0% 0 0 3.937969
nbody (click) 14884 19325 8 196 0 0% 0 0 5.122063
nqueens (click) 21155 28164 7 247 0 0% 0 0 7.251878
optcarrot (click) 327944 312320 190 4549 34 0% 0 0 103.421237
protoboeuf (click) 163392 155036 14 1610 0 0% 0 0 45.823237
protoboeuf-encode (click) 234584 230620 16 1249 0 0% 0 0 32.074934
rack (click) 239667 203639 36 417 0 0% 0 0 10.810227
ruby-json (click) 21296 18539 10 187 0 0% 0 0 5.335949
rubykon (click) 140693 120664 138 1568 3 0% 0 0 44.875415
sudoku (click) 48090 43120 9 536 0 0% 0 0 16.046162
tinygql (click) 273687 215874 61 787 5 0% 0 0 22.419811
30k_ifelse (click) 6315665 5791705 9261 56473 0 0% 0 0 1583.74245
30k_methods (click) 2235566 1593704 5780 19359 0 0% 0 0 455.731763
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.116251
fib (click) 4041 4120 5 37 0 0% 0 0 1.434905
getivar (click) 5037 6014 6 64 0 0% 0 0 1.928317
keyword_args (click) 7637 6022 7 60 0 0% 0 0 2.00639
object-new (click) 3469 3394 5 35 0 0% 0 0 1.332637
respond_to (click) 9322 2039 6 95 0 0% 0 0 2.685694
ruby-xor (click) 6437 6880 6 72 0 0% 0 0 2.240825
setivar (click) 4188 4690 6 44 0 0% 0 0 1.563673
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.687071
setivar_young (click) 5427 5560 7 54 0 0% 0 0 1.889296
str_concat (click) 7646 7893 9 81 0 0% 0 0 2.705235
throw (click) 7384 5592 8 59 0 0% 0 0 2.143755

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.