YJIT Benchmarks

Details for Benchmarks at 2024-08-27 02:39:52 UTC

YJIT metrics from the yjit-bench suite using Ruby 04ca75ea69

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.8% faster than CRuby 3.4.0dev
  • 3.6% faster than YJIT 3.3.4
On railsbench it is
  • 82.9% faster than CRuby 3.4.0dev
  • 1.7% 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 58 10 143 10 151
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 22 10 22
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 352 10 486 10 508
liquid-compile 10 345 10 343 10 498 10 502
liquid-render 10 137 10 137 10 356 10 372
lobsters 10 13 10 13 10 24 10 23
mail 10 161 10 159 10 234 10 230
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 235 10 237
ruby-lsp 10 129 10 125 10 216 10 217
sequel 10 321 10 318 10 440 10 431
binarytrees 10 51 10 49 10 118 10 107
blurhash 10 62 10 62 10 120 10 151
erubi 10 84 10 98 10 105 10 125
etanni 10 60 10 65 10 69 10 76
fannkuchredux 10 10 10 10 10 17 10 18
fluentd 10 10 10 10 10 10 10 10
graphql 10 10 10 10 10 10 10 10
graphql-native 10 28 10 31 10 33 10 34
lee 10 11 10 12 10 20 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 214 10 421 10 520
nqueens 10 113 10 114 10 113 10 450
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 156 10 152 10 582 10 691
protoboeuf-encode 10 133 10 170 10 293 10 655
rack 10 452 10 476 10 827 10 905
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 21 10 51 10 50
30k_ifelse 10 10 10 10 10 70 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 246 10 1108 10 1212
fib 10 102 10 93 10 616 10 618
getivar 10 214 10 241 10 1250 10 1748
keyword_args 10 90 10 88 10 730 10 947
object-new 10 230 10 192 10 309 10 242
respond_to 10 91 10 93 10 1785 10 2094
ruby-xor 10 29 10 31 10 92 10 166
setivar 10 348 10 360 10 2319 10 4824
setivar_object 10 216 10 227 10 536 10 526
setivar_young 10 216 10 224 10 528 10 523
str_concat 10 320 10 359 10 658 10 670
throw 10 970 10 814 10 1345 10 1067

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) 1343668 1170212 214 2178 0 0% 0 0 81.779192
chunky-png (click) 268070 206654 83 1054 1 0% 0 0 35.984991
erubi-rails (click) 1825325 1523061 246 2747 8 0% 0 0 95.773129
hexapdf (click) 1251810 1138277 506 11819 39 0% 0 0 415.582629
liquid-c (click) 454807 343214 119 1768 5 0% 0 0 58.633376
liquid-compile (click) 382227 337971 151 2065 2 0% 0 0 73.527686
liquid-render (click) 558109 509419 136 2323 8 0% 0 0 77.395604
lobsters (click) 7453300 6368516 3078 49910 166 0% 0 0 2267.573453
mail (click) 718036 673252 347 5554 14 0% 0 0 190.350906
psych-load (click) 230209 231089 61 594 3 0% 0 0 21.464896
railsbench (click) 3096230 2635828 1632 15884 41 0% 0 0 598.402804
rubocop (click) 5431996 4578314 2894 50967 114 0% 4 0 1942.946183
ruby-lsp (click) 786838 726298 309 4744 24 0% 0 0 161.727267
sequel (click) 425465 356377 16 116 0 0% 0 0 5.104672
binarytrees (click) 8404 7594 9 66 0 0% 0 0 3.02021
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.861869
erubi (click) 211440 170125 10 112 0 0% 0 0 4.695168
etanni (click) 24958 23898 11 92 0 0% 0 0 3.580146
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.707392
fluentd (click) 335723 288570 4 28 0 0% 0 0 1.295312
graphql (click) 368446 292627 66 650 0 0% 0 0 23.22487
graphql-native (click) 345703 296495 41 273 0 0% 0 0 10.317719
lee (click) 238090 163063 34 531 0 0% 0 0 19.739787
matmul (click) 7957 8968 7 82 0 0% 0 0 3.245826
nbody (click) 15014 19017 10 191 0 0% 0 0 6.199395
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.39763
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.669625
protoboeuf (click) 152449 147944 16 1500 0 0% 0 0 53.014131
protoboeuf-encode (click) 222321 205406 18 1239 0 0% 0 0 37.974336
rack (click) 218280 187833 37 408 0 0% 0 0 13.115286
ruby-json (click) 19008 16632 7 164 0 0% 0 0 5.467872
rubykon (click) 128589 131709 136 1482 3 0% 0 0 48.683519
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.247191
tinygql (click) 276838 233251 58 735 5 0% 0 0 24.494064
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1938.452259
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 539.842152
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.390411
fib (click) 4609 4792 7 45 0 0% 0 0 1.838263
getivar (click) 5575 6644 7 70 0 0% 0 0 2.336427
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.695282
object-new (click) 4039 4024 6 41 0 0% 0 0 1.909067
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.891291
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.961667
setivar (click) 4726 5320 7 50 0 0% 0 0 1.890246
setivar_object (click) 5109 5228 7 50 0 0% 0 0 2.004769
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.235963
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.205879
throw (click) 7538 6222 9 65 0 0% 0 0 2.684704

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.