Created
June 9, 2012 23:32
-
-
Save bobthecat/2903039 to your computer and use it in GitHub Desktop.
Rcpp cosine speed comparison
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(rbenchmark) | |
res <- benchmark( cosine(mat), | |
cosineRcpp(mat), | |
columns=c("test", "replications", "elapsed", | |
"relative", "user.self", "sys.self"), | |
order="relative", | |
replications=1000) | |
res | |
test replications elapsed relative user.self sys.self | |
2 cosineRcpp(mat) 1000 149.974 1.000000 139.389 7.356 | |
1 cosine(mat) 1000 161.268 1.075306 148.613 10.069 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment