YJIT Benchmarks

Details for Benchmarks at 2024-08-11 06:08:31 UTC

YJIT metrics from the yjit-bench suite using Ruby 21a9d7664c

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 72.5% faster than CRuby 3.4.0dev
  • 2.3% faster than YJIT 3.3.4
On railsbench it is
  • 78.7% faster than CRuby 3.4.0dev
  • 1.2% 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 49 10 50 10 116 10 122
chunky-png 10 18 10 17 10 36 10 40
erubi-rails 10 10 10 10 10 21 10 18
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 346 10 346 10 486 10 506
liquid-compile 10 344 10 332 10 485 10 513
liquid-render 10 139 10 133 10 355 10 368
lobsters 10 14 10 13 10 24 10 23
mail 10 161 10 154 10 227 10 222
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 136 10 131 10 227 10 215
ruby-lsp 10 131 10 122 10 214 10 211
sequel 10 315 10 308 10 426 10 416
binarytrees 10 51 10 49 10 118 10 115
blurhash 10 61 10 60 10 120 10 144
erubi 10 80 10 97 10 104 10 122
etanni 10 58 10 64 10 69 10 75
fannkuchredux 10 10 10 10 10 18 10 17
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 37 10 33 10 40 10 25
lee 10 11 10 10 10 20 10 20
matmul 10 10 10 10 10 15 10 16
nbody 10 207 10 198 10 407 10 473
nqueens 10 115 10 109 10 117 10 455
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 179 10 181 10 603 10 692
protoboeuf-encode 10 122 10 156 10 275 10 664
rack 10 457 10 483 10 817 10 887
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 31 10 31
tinygql 10 24 10 23 10 52 10 52
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 256 10 252 10 1105 10 1212
fib 10 105 10 105 10 616 10 618
getivar 10 257 10 220 10 1276 10 1726
keyword_args 10 91 10 87 10 720 10 946
object-new 10 228 10 203 10 300 10 259
respond_to 10 95 10 91 10 1729 10 2091
ruby-xor 10 31 10 23 10 99 10 155
setivar 10 430 10 374 10 2355 10 4838
setivar_object 10 266 10 241 10 652 10 695
setivar_young 10 262 10 240 10 651 10 691
str_concat 10 329 10 358 10 595 10 693
throw 10 986 10 872 10 1276 10 1122

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) 1366022 1210078 214 2169 0 0% 0 0 80.883196
chunky-png (click) 287349 265979 83 1054 1 0% 0 0 36.176432
erubi-rails (click) 1647274 1370052 274 2920 6 0% 0 0 102.795067
hexapdf (click) 1252035 1110546 505 11811 40 0% 0 0 413.138607
liquid-c (click) 475956 419408 119 1768 5 0% 0 0 58.76375
liquid-compile (click) 384291 334432 151 2070 2 0% 0 0 73.418455
liquid-render (click) 559892 484857 136 2323 8 0% 0 0 77.005762
lobsters (click) 7539684 6421326 3082 49755 81 0% 0 0 2264.449013
mail (click) 710129 658806 347 5554 14 0% 0 0 191.458356
psych-load (click) 224471 209358 61 594 3 0% 0 0 21.440835
railsbench (click) 2898839 2619053 1636 15969 57 0% 0 0 591.613769
rubocop (click) 5451010 4514896 2894 50971 114 0% 4 0 1942.546665
ruby-lsp (click) 798416 709233 309 4745 24 0% 0 0 161.432454
sequel (click) 426516 358608 16 117 0 0% 0 0 5.153297
binarytrees (click) 8404 7594 9 66 0 0% 0 0 3.007133
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.736886
erubi (click) 209465 179046 10 112 0 0% 0 0 4.547575
etanni (click) 28405 26890 11 91 0 0% 0 0 3.530521
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.769502
fluentd (click) 317855 288260 4 28 0 0% 0 0 1.336643
graphql (click) 389042 336898 66 650 0 0% 0 0 23.775879
graphql-native (click) 359125 303292 41 273 0 0% 0 0 10.608493
lee (click) 233171 195927 34 531 0 0% 0 0 19.526306
matmul (click) 7957 8968 7 82 0 0% 0 0 3.262883
nbody (click) 15014 19017 10 191 0 0% 0 0 6.228102
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.387402
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.512356
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 49.006742
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 37.039553
rack (click) 230933 198612 37 408 0 0% 0 0 12.996047
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.454591
rubykon (click) 128589 131709 136 1482 3 0% 0 0 48.787784
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.176076
tinygql (click) 246339 198287 58 735 5 0% 0 0 24.608544
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1929.099693
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 537.384146
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.3826
fib (click) 4609 4792 7 45 0 0% 0 0 1.899322
getivar (click) 5575 6644 7 70 0 0% 0 0 2.440029
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.669483
object-new (click) 4039 4024 6 41 0 0% 0 0 2.003576
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.909985
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 2.008136
setivar (click) 4726 5320 7 50 0 0% 0 0 1.923932
setivar_object (click) 5109 5228 7 50 0 0% 0 0 2.003704
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.260592
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.335937
throw (click) 7538 6222 9 65 0 0% 0 0 2.735269

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.