YJIT Benchmarks

Details for Benchmarks at 2024-08-26 06:08:28 UTC

YJIT metrics from the yjit-bench suite using Ruby 45c04cad40

Using the geomean of the headline benchmarks for x86 YJIT 3.4.0dev is
  • 74.1% faster than CRuby 3.4.0dev
  • 3.8% faster than YJIT 3.3.4
On railsbench it is
  • 80.1% faster than CRuby 3.4.0dev
  • 3.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 49 10 50 10 113 10 120
chunky-png 10 18 10 18 10 36 10 39
erubi-rails 10 10 10 10 10 21 10 21
hexapdf 10 10 10 10 10 10 10 10
liquid-c 10 341 10 350 10 499 10 519
liquid-compile 10 345 10 343 10 499 10 506
liquid-render 10 138 10 136 10 355 10 373
lobsters 10 14 10 13 10 24 10 23
mail 10 158 10 157 10 238 10 228
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 240
ruby-lsp 10 129 10 126 10 217 10 215
sequel 10 324 10 321 10 427 10 427
binarytrees 10 51 10 49 10 118 10 107
blurhash 10 62 10 63 10 120 10 147
erubi 10 83 10 97 10 104 10 124
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 29 10 31 10 31 10 35
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 163 10 283 10 636
rack 10 455 10 482 10 841 10 891
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 23 10 52 10 49
30k_ifelse 10 10 10 10 10 71 10 69
30k_methods 10 10 10 10 10 26 10 26
cfunc_itself 10 250 10 245 10 1108 10 1213
fib 10 101 10 97 10 616 10 618
getivar 10 214 10 242 10 1252 10 1744
keyword_args 10 89 10 87 10 730 10 947
object-new 10 230 10 217 10 308 10 287
respond_to 10 91 10 92 10 1786 10 2093
ruby-xor 10 30 10 24 10 92 10 165
setivar 10 348 10 360 10 2320 10 4822
setivar_object 10 216 10 211 10 536 10 517
setivar_young 10 216 10 227 10 528 10 533
str_concat 10 320 10 357 10 660 10 683
throw 10 971 10 909 10 1346 10 1213

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) 1357310 1210186 214 2169 0 0% 0 0 81.117786
chunky-png (click) 270197 242459 83 1054 1 0% 0 0 35.734175
erubi-rails (click) 1639387 1338054 275 2930 6 0% 0 0 102.370041
hexapdf (click) 1248093 1084429 505 11812 40 0% 0 0 413.362408
liquid-c (click) 475956 427600 119 1768 5 0% 0 0 58.551058
liquid-compile (click) 372207 348681 151 2082 2 0% 0 0 73.474611
liquid-render (click) 552880 490584 136 2326 8 0% 0 0 77.462183
lobsters (click) 7561588 6264691 3080 49789 81 0% 0 0 2250.484125
mail (click) 740389 718765 347 5554 14 0% 0 0 190.245688
psych-load (click) 239947 197012 61 592 3 0% 0 0 21.247959
railsbench (click) 2902097 2507236 1637 15989 57 0% 0 0 593.875662
rubocop (click) 5451567 4588331 2894 50969 114 0% 4 0 1935.337596
ruby-lsp (click) 787908 691224 309 4744 24 0% 0 0 158.91549
sequel (click) 421757 369727 16 118 0 0% 0 0 5.205876
binarytrees (click) 8404 7594 9 66 0 0% 0 0 2.999277
blurhash (click) 50094 43901 30 453 0 0% 0 0 17.726352
erubi (click) 228155 203188 10 112 0 0% 0 0 4.465683
etanni (click) 24958 23898 11 92 0 0% 0 0 3.56058
fannkuchredux (click) 23706 31291 4 252 0 0% 0 0 9.736776
fluentd (click) 325194 278873 4 28 0 0% 0 0 1.29714
graphql (click) 372749 337143 66 650 0 0% 0 0 22.720208
graphql-native (click) 342871 311792 41 273 0 0% 0 0 10.065067
lee (click) 249524 210620 34 531 0 0% 0 0 19.564534
matmul (click) 7957 8968 7 82 0 0% 0 0 3.231858
nbody (click) 15014 19017 10 191 0 0% 0 0 6.128741
nqueens (click) 23822 23823 9 279 0 0% 0 0 10.340263
optcarrot (click) 309010 266612 187 4398 34 0% 0 0 118.948684
protoboeuf (click) 139992 122036 16 1364 0 0% 0 0 48.404479
protoboeuf-encode (click) 212046 174944 18 1189 0 0% 0 0 36.608095
rack (click) 220407 182764 37 408 0 0% 0 0 12.866477
ruby-json (click) 22286 19409 7 164 0 0% 0 0 5.416703
rubykon (click) 128223 123238 136 1480 3 0% 0 0 48.501785
sudoku (click) 45292 24766 7 516 0 0% 0 0 19.196938
tinygql (click) 242221 235949 58 735 5 0% 0 0 23.915934
30k_ifelse (click) 5134313 4729205 9258 50774 0 0% 0 0 1903.842151
30k_methods (click) 2016559 1591611 5777 19335 0 0% 0 0 538.169292
cfunc_itself (click) 7172 6017 8 66 0 0% 0 0 2.348447
fib (click) 4609 4792 7 45 0 0% 0 0 1.845643
getivar (click) 5575 6644 7 70 0 0% 0 0 2.325829
keyword_args (click) 8042 6744 9 68 0 0% 0 0 2.640309
object-new (click) 4039 4024 6 41 0 0% 0 0 1.921331
respond_to (click) 7910 8158 8 81 0 0% 0 0 2.847923
ruby-xor (click) 5219 5772 4 58 0 0% 0 0 1.955217
setivar (click) 4726 5320 7 50 0 0% 0 0 1.889778
setivar_object (click) 5109 5228 7 50 0 0% 0 0 1.945626
setivar_young (click) 5819 5950 8 58 0 0% 0 0 2.201677
str_concat (click) 7415 7947 10 81 0 0% 0 0 3.211289
throw (click) 7538 6222 9 65 0 0% 0 0 2.658208

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.