[Rd] Performance of .C and .Call functions vs. native R code

Alireza Mahani alireza.s.mahani at gmail.com
Thu Jul 14 18:18:22 CEST 2011


You are absolutely right Gabe! I removed the line 'dim(A) <- dim(A)[1] *
dim(A)[2]' and my code still executes properly. As you said, matrices are
internally stored as one-dimensional arrays (column-major by default), it's
just that R exposes them differently by assigning different attributes to
them, but as far as C/C++ code is concerned there is no distinction.

Many thanks,
Alireza


--
View this message in context: http://r.789695.n4.nabble.com/Performance-of-C-and-Call-functions-vs-native-R-code-tp3665017p3668047.html
Sent from the R devel mailing list archive at Nabble.com.



More information about the R-devel mailing list