YJIT Benchmarks

Details for Benchmarks at 2024-08-31 03:26:50 UTC

YJIT metrics from the yjit-bench suite using Ruby a2b3cb65ea

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.9% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.4
On railsbench it is
  • 79.3% 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 145 10 152
chunky-png 10 18 10 18 10 36 10 41
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 353 10 492 10 509
liquid-compile 10 344 10 343 10 500 10 504
liquid-render 10 139 10 133 10 357 10 372
lobsters 10 13 10 13 10 24 10 22
mail 10 158 10 160 10 237 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 132 10 234 10 237
ruby-lsp 10 127 10 126 10 216 10 218
sequel 10 325 10 320 10 428 10 434
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 62 10 61 10 120 10 144
erubi 10 83 10 98 10 106 10 117
etanni 10 60 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 34
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 203 10 421 10 514
nqueens 10 112 10 115 10 113 10 439
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 159 10 151 10 583 10 695
protoboeuf-encode 10 132 10 169 10 292 10 666
rack 10 458 10 471 10 839 10 941
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 33
tinygql 10 23 10 23 10 51 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 249 10 271 10 1108 10 1212
fib 10 102 10 104 10 616 10 623
getivar 10 214 10 227 10 1252 10 1739
keyword_args 10 90 10 91 10 730 10 949
object-new 10 229 10 189 10 309 10 239
respond_to 10 90 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 230 10 536 10 512
setivar_young 10 216 10 232 10 528 10 509
str_concat 10 320 10 356 10 657 10 715
throw 10 971 10 815 10 1347 10 1056

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) 1461044 1274283 214 2301 0 0% 0 0 87.293826
chunky-png (click) 298376 253990 82 1090 1 0% 0 0 38.037854
erubi-rails (click) 1914880 1671080 245 2810 8 0% 0 0 99.910809
hexapdf (click) 1369328 1174519 507 12609 40 0% 0 0 447.301765
liquid-c (click) 488241 461194 118 1858 5 0% 0 0 62.440417
liquid-compile (click) 409083 342163 150 2180 2 0% 0 0 77.941484
liquid-render (click) 607646 503503 135 2472 12 0% 0 0 83.511015
lobsters (click) 8062450 6683887 3087 51819 182 0% 0 0 2382.510788
mail (click) 735464 614656 346 5481 16 0% 0 0 189.535405
psych-load (click) 249918 227546 60 615 3 0% 0 0 22.657729
railsbench (click) 3300579 2815556 1631 16703 41 0% 0 0 640.18223
rubocop (click) 5815882 4950481 2892 52177 110 0% 4 0 2024.633404
ruby-lsp (click) 840846 715654 308 4986 26 0% 0 0 174.730533
sequel (click) 461622 425659 15 119 0 0% 0 0 5.420746
binarytrees (click) 9721 8668 8 76 0 0% 0 0 3.741769
blurhash (click) 57136 49713 29 501 0 0% 0 0 20.319438
erubi (click) 227943 207798 9 108 0 0% 0 0 4.370752
etanni (click) 28250 26371 10 86 0 0% 0 0 3.31861
fannkuchredux (click) 22545 29447 3 240 0 0% 0 0 9.262994
fluentd (click) 366691 317642 3 22 0 0% 0 0 1.066422
graphql (click) 395530 329243 65 649 0 0% 0 0 23.24786
graphql-native (click) 366587 321545 41 275 0 0% 0 0 10.95629
lee (click) 255564 218963 33 567 0 0% 0 0 21.132098
matmul (click) 7323 8338 6 76 0 0% 0 0 3.017298
nbody (click) 15399 19810 9 201 0 0% 0 0 6.406385
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.34418
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 124.077379
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 57.277593
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.773543
rack (click) 226233 175454 36 422 0 0% 0 0 13.456377
ruby-json (click) 23921 20995 6 159 0 0% 0 0 5.298072
rubykon (click) 140687 120490 135 1573 3 0% 0 0 53.16571
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.995444
tinygql (click) 264688 215163 57 743 5 0% 0 0 25.482368
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 2237.533264
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 541.805745
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.278133
fib (click) 4585 4605 6 42 0 0% 0 0 1.780977
getivar (click) 5037 6014 6 64 0 0% 0 0 2.176515
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.602115
object-new (click) 3469 3394 5 35 0 0% 0 0 1.857773
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.544803
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.758257
setivar (click) 4188 4690 6 44 0 0% 0 0 1.696521
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.849273
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.06417
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.176778
throw (click) 7384 5592 8 59 0 0% 0 0 2.428919

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.