YJIT Benchmarks

Details for Benchmarks at 2024-09-20 20:42:02 UTC

YJIT metrics from the yjit-bench suite using Ruby 75ed086348

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 70.4% faster than CRuby 3.4.0dev
  • 2.2% faster than YJIT 3.3.4
On railsbench it is
  • 79.1% faster than CRuby 3.4.0dev
  • 2.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 58 10 58 10 146 10 152
chunky-png 10 17 10 17 10 36 10 39
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 342 10 348 10 501 10 504
liquid-compile 10 347 10 347 10 501 10 505
liquid-render 10 138 10 135 10 357 10 368
lobsters 10 13 10 13 10 24 10 23
mail 10 158 10 159 10 231 10 232
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
ruby-lsp 10 128 10 127 10 212 10 182
sequel 10 317 10 317 10 427 10 439
binarytrees 10 51 10 52 10 118 10 114
blurhash 10 63 10 63 10 120 10 148
erubi 10 81 10 58 10 104 10 128
etanni 10 60 10 68 10 69 10 80
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 28 10 40 10 32 10 47
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 19
nbody 10 203 10 221 10 421 10 510
nqueens 10 113 10 112 10 112 10 468
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 158 10 154 10 582 10 637
protoboeuf-encode 10 133 10 166 10 292 10 654
rack 10 458 10 483 10 818 10 883
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 35
tinygql 10 23 10 23 10 51 10 51
30k_ifelse 10 10 10 10 10 70 10 63
30k_methods 10 10 10 10 10 26 10 25
cfunc_itself 10 249 10 250 10 1108 10 1212
fib 10 102 10 102 10 616 10 623
getivar 10 214 10 245 10 1249 10 1750
keyword_args 10 90 10 88 10 729 10 948
object-new 10 230 10 192 10 309 10 243
respond_to 10 90 10 93 10 1785 10 2219
ruby-xor 10 30 10 30 10 92 10 175
setivar 10 348 10 403 10 2319 10 3116
setivar_object 10 216 10 227 10 536 10 484
setivar_young 10 216 10 228 10 529 10 478
str_concat 10 320 10 341 10 658 10 711
throw 10 983 10 815 10 1341 10 1045

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) 1448406 1235296 214 2301 0 0% 0 0 80.546592
chunky-png (click) 305801 261793 82 1090 1 0% 0 0 37.362661
erubi-rails (click) 1943504 1681518 245 2779 8 0% 0 0 89.383221
hexapdf (click) 1365183 1121870 507 12572 40 0% 0 0 433.062643
liquid-c (click) 493677 446133 119 1859 5 0% 0 0 60.183107
liquid-compile (click) 409144 321187 150 2200 2 0% 0 0 78.1452
liquid-render (click) 617885 521953 136 2473 12 0% 0 0 81.485968
lobsters (click) 8064958 6717107 3086 51911 182 0% 0 0 2069.008562
mail (click) 775278 728931 346 5489 16 0% 0 0 187.424426
psych-load (click) 264249 232755 60 615 3 0% 0 0 22.32303
railsbench (click) 3314200 2922639 1631 16690 41 0% 0 0 561.728772
ruby-lsp (click) 847061 780239 308 4991 26 0% 0 0 168.78405
sequel (click) 483637 382453 15 118 0 0% 0 0 4.949919
binarytrees (click) 9627 8546 8 75 0 0% 0 0 3.408566
blurhash (click) 57136 49713 29 501 0 0% 0 0 19.698205
erubi (click) 237081 216558 9 108 0 0% 0 0 4.304169
etanni (click) 28241 26371 10 86 0 0% 0 0 3.320464
fannkuchredux (click) 22572 29447 3 240 0 0% 0 0 9.28397
fluentd (click) 336762 317360 3 22 0 0% 0 0 0.98855
graphql (click) 421706 367873 65 651 0 0% 0 0 22.194993
graphql-native (click) 392871 310367 41 275 0 0% 0 0 10.246881
lee (click) 256387 246949 33 567 0 0% 0 0 20.64597
matmul (click) 7323 8338 6 76 0 0% 0 0 2.986154
nbody (click) 15428 19810 9 201 0 0% 0 0 6.279859
nqueens (click) 21699 28649 8 252 0 0% 0 0 9.601647
optcarrot (click) 324183 308580 186 4508 34 0% 0 0 121.540867
protoboeuf (click) 163936 155521 15 1615 0 0% 0 0 56.617578
protoboeuf-encode (click) 235128 231105 17 1254 0 0% 0 0 38.497774
rack (click) 240181 204559 36 422 0 0% 0 0 13.309177
ruby-json (click) 24330 21342 6 159 0 0% 0 0 5.263322
rubykon (click) 140687 120490 135 1573 3 0% 0 0 52.872494
sudoku (click) 44903 40454 6 507 0 0% 0 0 18.594556
tinygql (click) 263293 224719 57 743 5 0% 0 0 24.617628
30k_ifelse (click) 6312890 5789092 9257 56443 0 0% 0 0 1906.954461
30k_methods (click) 2232791 1591091 5776 19329 0 0% 0 0 541.325022
cfunc_itself (click) 6912 5554 7 62 0 0% 0 0 2.257542
fib (click) 4585 4605 6 42 0 0% 0 0 1.820446
getivar (click) 5037 6014 6 64 0 0% 0 0 2.107903
keyword_args (click) 8181 6507 8 65 0 0% 0 0 2.570746
object-new (click) 3469 3394 5 35 0 0% 0 0 1.565027
respond_to (click) 9866 2524 7 100 0 0% 0 0 3.545481
ruby-xor (click) 4619 5278 3 52 0 0% 0 0 1.793684
setivar (click) 4188 4690 6 44 0 0% 0 0 1.674848
setivar_object (click) 4717 4838 6 46 0 0% 0 0 1.845154
setivar_young (click) 5427 5560 7 54 0 0% 0 0 2.126542
str_concat (click) 7646 7893 9 81 0 0% 0 0 3.21856
throw (click) 7384 5592 8 59 0 0% 0 0 2.324945

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.