1
0
mirror of https://github.com/andre-wojtowicz/blas-benchmarks synced 2024-11-28 17:35:28 +01:00
blas-benchmarks/benchmark-sample.R

19 lines
292 B
R

runs = 10
f = function()
{
set.seed (1)
m <- 3500
n <- 3500
A <- matrix (runif (m*n),m,n)
# Matrix multiply
B <- crossprod(A)
}
cumulate = 0
for (i in 1:runs)
cumulate = cumulate + as.numeric(system.time(f())[3])
cat(paste0(round(cumulate/runs, 3), "\n"))