YJIT Benchmarks

Details for Benchmarks at 2024-08-13 06:08:32 UTC

YJIT metrics from the yjit-bench suite using Ruby 436d23f80d

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 75.7% faster than CRuby 3.4.0dev
  • 3.1% faster than YJIT 3.3.4
On railsbench it is
  • 80.5% faster than CRuby 3.4.0dev
  • 1.1% 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 47 10 119 10 116
chunky-png 10 18 10 18 10 35 10 40
erubi-rails 10 10 10 10 10 21 10 21
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 349 10 344 10 488 10 505
liquid-compile 10 344 10 341 10 497 10 503
liquid-render 10 139 10 134 10 352 10 371
lobsters 10 14 10 13 10 24 10 23
mail 10 162 10 157 10 238 10 233
psych-load 10 10 10 10 10 10 10 10
railsbench 10 10 10 10 10 10 10 10
rubocop 10 135 10 130 10 234 10 241
ruby-lsp 10 130 10 124 10 217 10 215
sequel 10 322 10 311 10 424 10 424
binarytrees 10 50 10 52 10 118 10 119
blurhash 10 62 10 60 10 120 10 145
erubi 10 84 10 96 10 105 10 125
etanni 10 60 10 64 10 69 10 75
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 30 10 31 10 34
lee 10 11 10 11 10 19 10 21
matmul 10 10 10 10 10 15 10 18
nbody 10 203 10 213 10 421 10 532
nqueens 10 113 10 113 10 113 10 446
optcarrot 10 10 10 10 10 10 10 10
protoboeuf 10 181 10 185 10 572 10 754
protoboeuf-encode 10 125 10 156 10 283 10 642
rack 10 453 10 467 10 829 10 921
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 22 10 51 10 51
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 244 10 1108 10 1211
fib 10 102 10 102 10 616 10 618
getivar 10 215 10 252 10 1252 10 1757
keyword_args 10 85 10 89 10 729 10 947
object-new 10 224 10 215 10 308 10 279
respond_to 10 91 10 90 10 1787 10 2092
ruby-xor 10 30 10 31 10 92 10 169
setivar 10 348 10 405 10 2319 10 4870
setivar_object 10 216 10 241 10 536 10 605
setivar_young 10 216 10 244 10 528 10 590
str_concat 10 319 10 352 10 658 10 735
throw 10 970 10 908 10 1341 10 1218

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) 1358591 1202371 214 2169 0 0% 0 0 81.747326
chunky-png (click) 273168 259025 83 1054 1 0% 0 0 35.893854
erubi-rails (click) 1636212 1425966 274 2920 6 0% 0 0 102.709229
hexapdf (click) 1257282 1093547 505 11811 41 0% 0 0 413.664066
liquid-c (click) 457840 395804 119 1765 5 0% 0 0 58.50963
liquid-compile (click) 384477 325553 151 2078 2 0% 0 0 73.552317
liquid-render (click) 559564 480987 136 2326 8 0% 0 0 77.907635
lobsters (click) 7544820 6370306 3082 49950 81 0% 0 0 2261.451849
mail (click) 719376 675912 347 5554 14 0% 0 0 190.174019
psych-load (click) 236872 224435 61 594 3 0% 0 0 21.440186
railsbench (click) 2900881 2448869 1636 15963 57 0% 0 0 593.866865
rubocop (click) 5440090 4697343 2894 50963 114 0% 4 0 1939.197617
ruby-lsp (click) 790703 700260 309 4744 24 0% 0 0 161.25519
sequel (click) 432811 386961 16 118 0 0% 0 0 5.315103
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.979799
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.889
erubi (click) 209085 195050 10 112 0 0% 0 0 4.469231
etanni (click) 28405 26890 11 91 0 0% 0 0 3.491396
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.819809
fluentd (click) 338257 314731 4 28 0 0% 0 0 1.336983
graphql (click) 370512 352910 66 650 0 0% 0 0 23.275688
graphql-native (click) 340629 311158 41 273 0 0% 0 0 10.222668
lee (click) 235486 179252 34 531 0 0% 0 0 19.768707
matmul (click) 7957 8968 7 82 0 0% 0 0 3.233864
nbody (click) 15014 19017 10 191 0 0% 0 0 6.238606
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.391909
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 119.474101
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.912481
protoboeuf-encode (click) 212046 158560 18 1189 0 0% 0 0 36.704612
rack (click) 232702 224803 37 408 0 0% 0 0 13.011975
ruby-json (click) 22939 19989 7 164 0 0% 0 0 5.419605
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.374277
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.356173
tinygql (click) 247253 216259 58 735 5 0% 0 0 24.331527
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1932.277939
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 537.05813
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.349757
fib (click) 4609 4792 7 45 0 0% 0 0 1.829101
getivar (click) 5575 6644 7 70 0 0% 0 0 2.307974
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.641735
object-new (click) 4039 4024 6 41 0 0% 0 0 2.088905
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.861151
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.933815
setivar (click) 4726 5320 7 50 0 0% 0 0 1.855142
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.951269
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.197831
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.24585
throw (click) 7538 6222 9 65 0 0% 0 0 2.621328

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.