1
0
mirror of https://github.com/andre-wojtowicz/blas-benchmarks synced 2024-07-22 16:45:31 +02:00

changed sample benchmark

This commit is contained in:
Andrzej Wójtowicz 2016-05-29 17:57:09 +02:00
parent e0c075fcea
commit 095e5278d2

View File

@ -1,15 +1,18 @@
library(rbenchmark) runs = 10
f = function() f = function()
{ {
set.seed (1) set.seed (1)
m <- 1000 m <- 4000
n <- 500 n <- 4000
A <- matrix (runif (m*n),m,n) A <- matrix (runif (m*n),m,n)
# Matrix multiply # Matrix multiply
B <- crossprod(A) B <- crossprod(A)
} }
print(benchmark(f(), replications=100)) cumulate = 0
for (i in 1:runs)
cumulate = cumulate + as.numeric(system.time(f())[3])
cat(paste0(round(cumulate/runs, 3), "\n"))