blob: 34c7554cd074bc5a8bd827cc44ff7f72468a56f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
library(lossdistrib)
p <- runif(1000)
S <- runif(1000)
w <- rep(1/10000,10000)
run1 <- system.time(for(i in 1:1000){
lossdistC(p, w, S, 301)
})
cat("simple lossdist", run1["elapsed"], "\n")
run2 <- system.time(for(i in 1:1000){
lossdistCblas(p, w, S, 301)
})
# the blas function should be roughly twice as fast
cat("blas lossdist", run2["elapsed"], "\n")
|