I have had a similar experience; I wrote a small-moderate sized
function to do some simulations and tested via sourceCpp() (and
included an explicit instance of RNGScope() as well) with no problems
whatever. Then I wrote a wrapper to this function and tried running it
in parallel with mclapply and
I don't have the answer to his question, but it looks like he's not
comparing R to Rcpp/C++ but rather "pure" C++ to Rcpp/C++. And the
suspect code he posted isn't doing anything obviously (to me) silly,
like repeatedly calling back into R (of course it would have bigger
problems trying to do that
In a related vein, is there any functionality - existant or planned -
for "fancy" indexing (that is, selecting non-continguous submatrices)
a la
X = matrix(1:24, nrow=3)
Y = X[,c(2,4,7)]
As it stands I'd create a new matrix and loop over the column indices
to populate it. Not a big deal since my