YJIT Benchmarks

Details for Benchmarks at 2024-08-30 18:53:05 UTC

YJIT metrics from the yjit-bench suite using Ruby 89bbb9a888

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.4% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.4
On railsbench it is
  • 78.7% faster than CRuby 3.4.0dev
  • 1.1% slower 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 10 49 10 49 10 113 10 120
chunky-png 10 18 10 18 10 35 10 41
erubi-rails 10 10 10 10 10 22 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 341 10 347 10 498 10 511
liquid-compile 10 344 10 350 10 502 10 506
liquid-render 10 136 10 135 10 355 10 364
lobsters 10 14 10 13 10 24 10 23
mail 10 158 10 160 10 233 10 234
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 236 10 235
ruby-lsp 10 127 10 127 10 220 10 222
sequel 10 317 10 321 10 420 10 439
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 63 10 60 10 120 10 144
erubi 10 81 10 97 10 105 10 124
etanni 10 59 10 65 10 69 10 77
fannkuchredux 10 10 10 10 10 17 10 20
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 31 10 35
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 203 10 421 10 514
nqueens 10 114 10 115 10 113 10 439
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 181 10 179 10 572 10 684
protoboeuf-encode 10 125 10 162 10 283 10 642
rack 10 461 10 460 10 833 10 920
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 23 10 52 10 52
30k_ifelse 10 10 10 10 10 70 10 62
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 248 10 271 10 1108 10 1212
fib 10 101 10 102 10 615 10 623
getivar 10 214 10 230 10 1255 10 1736
keyword_args 10 90 10 90 10 729 10 949
object-new 10 224 10 189 10 309 10 239
respond_to 10 91 10 96 10 1784 10 2219
ruby-xor 10 30 10 31 10 92 10 178
setivar 10 348 10 378 10 2319 10 3101
setivar_object 10 216 10 231 10 536 10 513
setivar_young 10 216 10 231 10 528 10 509
str_concat 10 319 10 356 10 658 10 720
throw 10 966 10 813 10 1345 10 1058

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) 1466063 1214234 214 2299 0 0% 0 0 87.645743
chunky-png (click) 287188 254160 82 1090 1 0% 0 0 38.078999
erubi-rails (click) 1762665 1499591 274 3003 6 0% 0 0 106.911423
hexapdf (click) 1371417 1159559 507 12609 41 0% 0 0 449.599624
liquid-c (click) 496816 426998 118 1858 5 0% 0 0 62.729986
liquid-compile (click) 408017 327402 150 2197 2 0% 0 0 78.504697
liquid-render (click) 601348 554889 135 2472 12 0% 0 0 83.994867
lobsters (click) 8199306 6821895 3078 51489 85 0% 0 0 2381.051081
mail (click) 740928 658985 346 5481 16 0% 0 0 189.907787
psych-load (click) 248830 242126 60 615 3 0% 0 0 22.891298
railsbench (click) 3109725 2758242 1636 16752 57 0% 0 0 635.669027
rubocop (click) 5818569 4931120 2892 52182 110 0% 4 0 2035.223964
ruby-lsp (click) 883593 770588 308 4986 26 0% 0 0 172.932259
sequel (click) 464969 438791 15 117 0 0% 0 0 5.503671
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.506974
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.323218
erubi (click) 222314 185840 9 108 0 0% 0 0 4.355446
etanni (click) 24711 23355 10 87 0 0% 0 0 3.379076
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.241178
fluentd (click) 353607 316062 3 22 0 0% 0 0 1.055299
graphql (click) 389629 323535 65 649 0 0% 0 0 23.46942
graphql-native (click) 364915 316678 40 270 0 0% 0 0 10.216785
lee (click) 250618 233109 33 567 0 0% 0 0 20.974572
matmul (click) 7323 8338 6 76 0 0% 0 0 3.008511
nbody (click) 15399 19810 9 201 0 0% 0 0 6.41922
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.354867
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 123.943495
protoboeuf (click) 147776 155834 15 1438 0 0% 0 0 52.007245
protoboeuf-encode (click) 221137 218623 17 1204 0 0% 0 0 37.815999
rack (click) 237215 215276 36 417 0 0% 0 0 13.526112
ruby-json (click) 18566 16002 6 158 0 0% 0 0 5.182761
rubykon (click) 141083 128961 135 1575 3 0% 0 0 53.345488
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.927975
tinygql (click) 265947 241107 57 743 5 0% 0 0 24.645974
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2220.712451
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 544.852618
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.278184
fib (click) 4585 4605 6 42 0 0% 0 0 1.947695
getivar (click) 5037 6014 6 64 0 0% 0 0 2.089667
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.618971
object-new (click) 3469 3394 5 35 0 0% 0 0 1.841043
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.563651
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.747396
setivar (click) 4188 4690 6 44 0 0% 0 0 1.676805
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.803903
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.099975
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.168775
throw (click) 7384 5592 8 59 0 0% 0 0 2.430668

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.