YJIT Benchmarks

Details for Benchmarks at 2024-10-10 04:00:07 UTC

YJIT metrics from the yjit-bench suite using Ruby 5792bd7149

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 73.3% faster than CRuby 3.4.0dev
  • 3.3% faster than YJIT 3.3.4
On railsbench it is
  • 76.8% faster than CRuby 3.4.0dev
  • 1.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 10 56 10 59 10 143 10 152
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 23 10 23
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 353 10 497 10 519
liquid-compile 10 346 10 358 10 499 10 510
liquid-render 10 138 10 137 10 355 10 372
lobsters 10 13 10 13 10 24 10 24
mail 10 159 10 162 10 238 10 232
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 134 10 235 10 241
ruby-lsp 10 129 10 126 10 222 10 218
sequel 10 318 10 324 10 441 10 446
binarytrees 10 51 10 50 10 118 10 113
blurhash 10 62 10 62 10 120 10 147
erubi 10 83 10 99 10 105 10 113
etanni 10 59 10 69 10 69 10 80
fannkuchredux 10 59 10 59 10 123 10 133
fluentd 10 38 10 43 10 42 10 48
graphql 10 61 10 61 10 75 10 74
graphql-native 10 29 10 40 10 33 10 47
lee 10 11 10 11 10 20 10 21
matmul 10 38 10 46 10 72 10 84
nbody 10 203 10 220 10 421 10 523
nqueens 10 113 10 115 10 109 10 436
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 158 10 582 10 641
protoboeuf-encode 10 133 10 168 10 294 10 660
rack 10 458 10 484 10 836 10 887
ruby-json 10 64 10 66 10 76 10 79
rubykon 10 13 10 13 10 37 10 39
sudoku 10 48 10 51 10 139 10 156
tinygql 10 23 10 23 10 51 10 52
30k_ifelse 10 26 10 26 10 230 10 206
30k_methods 10 32 10 32 10 342 10 341
cfunc_itself 10 250 10 255 10 1108 10 1212
fib 10 102 10 100 10 616 10 623
getivar 10 214 10 238 10 1247 10 1745
keyword_args 10 89 10 88 10 730 10 947
object-new 10 230 10 186 10 309 10 237
respond_to 10 91 10 88 10 1785 10 2217
ruby-xor 10 186 10 190 10 497 10 841
setivar 10 348 10 418 10 2319 10 3124
setivar_object 10 215 10 233 10 536 10 488
setivar_young 10 216 10 235 10 528 10 494
str_concat 10 320 10 348 10 658 10 660
throw 10 959 10 837 10 1344 10 1022

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) 1450985 1214382 214 2301 0 0% 0 0 74.909952
chunky-png (click) 295932 285616 82 1090 1 0% 0 0 35.41921
erubi-rails (click) 1916635 1632779 246 2796 8 0% 0 0 84.591376
hexapdf (click) 1352917 1103911 507 12565 35 0% 0 0 394.230785
liquid-c (click) 486837 434657 119 1859 5 0% 0 0 57.041487
liquid-compile (click) 407233 351592 150 2206 2 0% 0 0 73.991188
liquid-render (click) 593775 517394 136 2473 12 0% 0 0 75.549286
lobsters (click) 8028933 6795416 3087 51683 183 0% 0 0 1893.892359
mail (click) 770147 691824 346 5481 16 0% 0 0 175.488353
psych-load (click) 246444 232068 60 615 3 0% 0 0 21.162272
railsbench (click) 3297585 2807892 1631 16662 41 0% 0 0 525.658277
rubocop (click) 5808317 5026054 2892 52149 110 0% 4 0 1677.578446
ruby-lsp (click) 840018 755514 308 4990 26 0% 0 0 155.950829
sequel (click) 467266 409906 15 118 0 0% 0 0 4.928406
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.406478
blurhash (click) 57136 49713 29 501 0 0% 0 0 18.54671
erubi (click) 228264 208181 9 108 0 0% 0 0 4.083137
etanni (click) 28241 26371 10 86 0 0% 0 0 3.212597
fannkuchredux (click) 24582 31311 6 262 0 0% 0 0 8.832431
fluentd (click) 377960 320873 11 114 0 0% 0 0 4.222374
graphql (click) 391318 326000 70 700 0 0% 0 0 23.584472
graphql-native (click) 356006 319940 41 275 0 0% 0 0 9.788872
lee (click) 252796 199474 33 567 0 0% 0 0 19.448035
matmul (click) 7323 8338 6 76 0 0% 0 0 2.870581
nbody (click) 15428 19810 9 201 0 0% 0 0 5.961376
nqueens (click) 21699 28649 8 252 0 0% 0 0 8.733815
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 113.746016
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 52.8965
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 36.358702
rack (click) 267456 243867 36 417 0 0% 0 0 12.557721
ruby-json (click) 27649 24400 11 193 0 0% 0 0 6.249962
rubykon (click) 137360 133862 132 1535 3 0% 0 0 48.523846
sudoku (click) 44908 40454 6 507 0 0% 0 0 17.08735
tinygql (click) 297387 260582 57 743 5 0% 0 0 23.45647
30k_ifelse (click) 6316209 5792190 9262 56478 0 0% 0 0 1820.90472
30k_methods (click) 2236110 1594189 5781 19364 0 0% 0 0 531.563929
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.215732
fib (click) 4585 4605 6 42 0 0% 0 0 1.789926
getivar (click) 5037 6014 6 64 0 0% 0 0 2.026593
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.519
object-new (click) 3469 3394 5 35 0 0% 0 0 1.597278
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.372628
ruby-xor (click) 6981 7365 7 77 0 0% 0 0 2.778355
setivar (click) 4188 4690 6 44 0 0% 0 0 1.7116
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.860187
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.121635
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.1668
throw (click) 7384 5592 8 59 0 0% 0 0 2.307349

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.