[Rcpp-devel] Question on performance

Dirk Eddelbuettel edd at debian.org
Sat Sep 22 20:21:33 CEST 2018


On 22 September 2018 at 12:36, Michael Weylandt wrote:
| I don't have time right now, but the offending line is here:
| 
| https://github.com/jesusfv/Comparison-Programming-Languages-Economics/blob/master/RBC_Rcpp.R#L62
| 
| which calls `sourceCpp` repeatedly on each loop iteration.
| 
| Should be a one line change to move it outside the loop and un-sully the
| good name of Rcpp.

Nice catch!!  You should _definitely_ send him a PR. I also suggest to move
the sourceCpp() outside the timed segment as I do not think he accounts for
compilation in the other approaches (eg C++).

Dirk

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org


More information about the Rcpp-devel mailing list