YJIT Benchmarks

Details for Benchmarks at 2024-08-24 06:08:33 UTC

YJIT metrics from the yjit-bench suite using Ruby 552f5cd50c

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.6% faster than CRuby 3.4.0dev
  • 3.5% faster than YJIT 3.3.4
On railsbench it is
  • 80.2% 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 49 10 118 10 119
chunky-png 10 18 10 18 10 36 10 39
erubi-rails 10 10 10 10 10 21 10 20
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 347 10 348 10 486 10 512
liquid-compile 10 345 10 342 10 500 10 507
liquid-render 10 137 10 133 10 357 10 371
lobsters 10 14 10 13 10 24 10 23
mail 10 159 10 156 10 233 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 239
ruby-lsp 10 129 10 124 10 217 10 223
sequel 10 324 10 318 10 440 10 430
binarytrees 10 51 10 51 10 118 10 107
blurhash 10 62 10 62 10 120 10 147
erubi 10 79 10 97 10 105 10 123
etanni 10 60 10 64 10 69 10 77
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 29 10 32 10 33 10 39
lee 10 11 10 12 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 215 10 421 10 514
nqueens 10 111 10 114 10 113 10 442
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 182 10 184 10 572 10 684
protoboeuf-encode 10 125 10 164 10 283 10 636
rack 10 464 10 480 10 836 10 897
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 24 10 22 10 51 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 250 10 249 10 1108 10 1212
fib 10 102 10 103 10 616 10 618
getivar 10 214 10 241 10 1251 10 1748
keyword_args 10 90 10 86 10 730 10 947
object-new 10 228 10 217 10 308 10 287
respond_to 10 90 10 90 10 1784 10 2094
ruby-xor 10 30 10 25 10 92 10 165
setivar 10 348 10 361 10 2319 10 4824
setivar_object 10 216 10 226 10 536 10 519
setivar_young 10 216 10 227 10 530 10 534
str_concat 10 317 10 357 10 658 10 683
throw 10 973 10 899 10 1336 10 1214

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) 1363302 1181463 214 2169 0 0% 0 0 81.626756
chunky-png (click) 274364 213450 83 1054 1 0% 0 0 35.986033
erubi-rails (click) 1639153 1387334 275 2924 6 0% 0 0 102.236899
hexapdf (click) 1250848 1071742 505 11813 39 0% 0 0 413.331199
liquid-c (click) 464813 430744 119 1768 5 0% 0 0 57.517048
liquid-compile (click) 391781 348690 151 2096 2 0% 0 0 74.465755
liquid-render (click) 562766 523600 136 2323 8 0% 0 0 76.734374
lobsters (click) 7558243 6298015 3080 49746 81 0% 0 0 2243.195828
mail (click) 710243 667355 347 5554 14 0% 0 0 190.211905
psych-load (click) 235278 209998 61 594 3 0% 0 0 21.370846
railsbench (click) 2903099 2516322 1637 15980 57 0% 0 0 590.797176
rubocop (click) 5440375 4618704 2894 50964 114 0% 4 0 1941.341983
ruby-lsp (click) 793876 653235 309 4745 24 0% 0 0 159.977132
sequel (click) 426717 365758 16 117 0 0% 0 0 5.006303
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.989863
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.713401
erubi (click) 214204 186926 10 112 0 0% 0 0 4.617528
etanni (click) 28405 26890 11 91 0 0% 0 0 3.463321
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.652935
fluentd (click) 330837 275839 4 28 0 0% 0 0 1.343863
graphql (click) 372930 337371 66 650 0 0% 0 0 22.749106
graphql-native (click) 352012 311660 42 278 0 0% 0 0 10.719971
lee (click) 243161 219864 34 531 0 0% 0 0 19.584733
matmul (click) 7957 8968 7 82 0 0% 0 0 3.204542
nbody (click) 15014 19017 10 191 0 0% 0 0 6.175415
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.424016
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 120.121031
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.807505
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.807274
rack (click) 226297 191508 37 413 0 0% 0 0 13.439639
ruby-json (click) 24237 21549 7 166 0 0% 0 0 5.515933
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.25086
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.152745
tinygql (click) 251191 236145 58 735 5 0% 0 0 24.223964
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1923.816075
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 533.535776
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.334827
fib (click) 4609 4792 7 45 0 0% 0 0 1.835294
getivar (click) 5575 6644 7 70 0 0% 0 0 2.341832
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.64061
object-new (click) 4039 4024 6 41 0 0% 0 0 1.969924
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.867931
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.932251
setivar (click) 4726 5320 7 50 0 0% 0 0 1.872249
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.948968
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.196164
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.220205
throw (click) 7538 6222 9 65 0 0% 0 0 2.684845

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.