YJIT Benchmarks

Details for Benchmarks at 2024-09-04 04:00:20 UTC

YJIT metrics from the yjit-bench suite using Ruby 37d7ae06af.

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.2% faster than CRuby 3.4.0dev
  • 1.7% faster than YJIT 3.3.4
On railsbench it is
  • 80.1% faster than CRuby 3.4.0dev
  • the same speed as YJIT 3.3.4
x86_64 runtime: 3 hours, 41 minutes
aarch64 runtime: 6 hours, 56 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.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 49 10 50 10 117 10 121
chunky-png 10 18 10 17 10 35 10 41
erubi-rails 10 10 10 10 10 21 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 348 10 486 10 507
liquid-compile 10 345 10 342 10 514 10 497
liquid-render 10 138 10 133 10 354 10 366
lobsters 10 14 10 13 10 25 10 23
mail 10 161 10 158 10 238 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 131 10 235 10 236
ruby-lsp 10 127 10 126 10 212 10 185
sequel 10 315 10 317 10 435 10 432
binarytrees 10 51 10 50 10 118 10 111
blurhash 10 62 10 63 10 120 10 144
erubi 10 84 10 95 10 100 10 121
etanni 10 60 10 64 10 69 10 75
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 29 10 31 10 32 10 34
lee 10 11 10 11 10 20 10 20
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 232 10 421 10 539
nqueens 10 112 10 112 10 113 10 448
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 181 10 183 10 572 10 633
protoboeuf-encode 10 124 10 154 10 283 10 637
rack 10 452 10 464 10 805 10 897
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 32
tinygql 10 23 10 22 10 52 10 53
30k_ifelse 10 10 10 10 10 71 10 62
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 251 10 1108 10 1209
fib 10 101 10 101 10 615 10 623
getivar 10 214 10 241 10 1249 10 1750
keyword_args 10 90 10 87 10 729 10 946
object-new 10 227 10 195 10 308 10 241
respond_to 10 91 10 86 10 1785 10 2210
ruby-xor 10 30 10 31 10 92 10 171
setivar 10 348 10 412 10 2319 10 3121
setivar_object 10 216 10 244 10 536 10 513
setivar_young 10 216 10 246 10 528 10 515
str_concat 10 320 10 333 10 658 10 656
throw 10 969 10 825 10 1342 10 1038

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) 1469930 1260618 214 2299 0 0% 0 0 88.190685
chunky-png (click) 299769 256891 82 1090 1 0% 0 0 38.012037
erubi-rails (click) 1761913 1531611 274 3003 6 0% 0 0 106.066845
hexapdf (click) 1368041 1247276 507 12609 39 0% 0 0 446.414143
liquid-c (click) 499268 445673 118 1858 5 0% 0 0 62.401663
liquid-compile (click) 413217 356526 150 2192 2 0% 0 0 79.712178
liquid-render (click) 605315 543098 135 2476 12 0% 0 0 83.576516
lobsters (click) 8174162 6740241 3078 51353 85 0% 0 0 2374.564053
mail (click) 740716 700278 346 5481 16 0% 0 0 190.116069
psych-load (click) 278748 252212 60 615 3 0% 0 0 22.670653
railsbench (click) 3099473 2668937 1636 16740 57 0% 0 0 634.680786
rubocop (click) 5814587 4969414 2892 52189 110 0% 4 0 2022.889572
ruby-lsp (click) 869986 768463 308 4986 26 0% 0 0 173.857222
sequel (click) 465594 423113 15 119 0 0% 0 0 5.468706
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.468554
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.165764
erubi (click) 232039 202848 9 108 0 0% 0 0 4.415584
etanni (click) 28250 26371 10 86 0 0% 0 0 3.3088
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.230917
fluentd (click) 348336 278132 3 22 0 0% 0 0 1.083362
graphql (click) 406925 331349 65 649 0 0% 0 0 23.414218
graphql-native (click) 380215 324742 40 270 0 0% 0 0 10.130631
lee (click) 260942 217592 33 567 0 0% 0 0 20.754771
matmul (click) 7323 8338 6 76 0 0% 0 0 3.030598
nbody (click) 15399 19810 9 201 0 0% 0 0 6.466952
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.233941
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 123.28208
protoboeuf (click) 147776 155834 15 1438 0 0% 0 0 51.87785
protoboeuf-encode (click) 221137 218623 17 1204 0 0% 0 0 37.807586
rack (click) 243589 208852 36 417 0 0% 0 0 13.291617
ruby-json (click) 23010 19730 6 158 0 0% 0 0 5.123873
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.795313
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.874512
tinygql (click) 294323 241668 57 743 5 0% 0 0 24.656079
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2232.52736
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 546.112092
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.26577
fib (click) 4585 4605 6 42 0 0% 0 0 1.835944
getivar (click) 5037 6014 6 64 0 0% 0 0 2.167543
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.652557
object-new (click) 3469 3394 5 35 0 0% 0 0 1.822218
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.612121
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.772537
setivar (click) 4188 4690 6 44 0 0% 0 0 1.767078
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.831823
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.078999
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.175103
throw (click) 7384 5592 8 59 0 0% 0 0 2.449693

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.