search for: tc_r

Displaying 1 result from an estimated 1 matches for "tc_r".

Did you mean: cc_r
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
...l: ", 1000000*(round(tCall_R,2) - round(tCall_c,2))/N, "usec\n") # measuring .C tC_c <- 0.0 t1 <- proc.time()[3] for (i in 1:N) { tC_c <- tC_c + .C("matvecMultiply2", as.double(A), as.double(x), double(c(m)), as.integer(c(m)), as.integer(c(n)), t = double(1))$t } tC_R <- proc.time()[3] - t1 cat(".C - Time measured in R: ", round(tC_R,2), "sec\n") cat(".C - Time measured in C++: ", round(tC_c,2), "sec\n") cat(".C - Implied overhead: ", round(tC_R,2) - round(tC_c,2), "sec -> per call: ", 1000000*(...