tests_benchmark/test-benchmark-linearAlgebra-vec-mean-dot.R

## ---- test-benchmark-linearAlgebra-vec-mean-dot
lapply(
  X = 1,
  FUN = function(i,
                 n,
                 times) {
    x <- rnorm(n = n)
    output <- microbenchmark::microbenchmark(
      `.vec_mean` = .vec_mean(x),
      `vec_mean` = vec_mean(x),
      `mean` = mean(x),
      times = times
    )
    print(output)
    ggplot2::autoplot(output)
  },
  n = 10000,
  times = 500
)
jeksterslab/linearAlgebra documentation built on Dec. 20, 2021, 10:10 p.m.