search for: 500x20

Displaying 2 results from an estimated 2 matches for "500x20".

Did you mean: 500,20
2008 Feb 29
0
Variable modified from within a function
...he thing is that passing "data" as an argument to g() involves copying the data, if I understood correctly. Something I'd be keen to avoid because in the real programme I want to write, g() is called many a time and data is rather big (not infamously massive, though, something like a 500x20 matrix). If no other solution exists, I can do this: f <- function (...) { data <- my.readfile(...); g <- function (...) { # Do something with data } g(...) } This may be very common practice in R, I don't know, but my feeling as a beginner is that it's rather ineleg...
2011 Jul 19
1
Measuring and comparing .C and .Call overhead
...l works by passing pointers. (How can we explain the slight increase in overhead?) 2- C++ times for .C are somewhat better than .Call. This is likely to be due to the overhead associated with unpacking the SEXP pointers in a .Call function. 3- The overhead for .C dominates the execution time. For a 500x20 matrix, the overhead is ~90% of total time. This means that whenever we need to make repeated calls to a C/C++ function from R, and when performance is important to us, .Call is much preferred to .C, even at modest data sizes. 4- Overhead for .C scales sub-linearly with data size. I imagine that th...