<div dir="ltr"><div dir="ltr"><div>I don't have time right now, but the offending line is here: <br></div><div><br></div><div><a href="https://github.com/jesusfv/Comparison-Programming-Languages-Economics/blob/master/RBC_Rcpp.R#L62">https://github.com/jesusfv/Comparison-Programming-Languages-Economics/blob/master/RBC_Rcpp.R#L62</a></div><div><br></div><div>which calls `sourceCpp` repeatedly on each loop iteration. <br></div><div><br></div><div>Should be a one line change to move it outside the loop and un-sully the good name of Rcpp. <br></div><div><br></div><div>M<br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Sep 22, 2018 at 12:31 PM, Dirk Eddelbuettel <span dir="ltr"><<a href="mailto:edd@debian.org" target="_blank">edd@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 22 September 2018 at 19:15, Iñaki Ucar wrote:<br>
| FYI, you can find the code here:<br>
| <br>
| <a href="https://github.com/jesusfv/Comparison-Programming-Languages-Economics" rel="noreferrer" target="_blank">https://github.com/jesusfv/<wbr>Comparison-Programming-<wbr>Languages-Economics</a><br>
<br>
</span>Nice catch!<br>
<br>
Have not had time to look. Any volunteers willing to dive in, ie fork or<br>
clone the thing and clean up? Happy to help.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dirk<br>
</font></span><div class="HOEnZb"><div class="h5"> <br>
| <br>
| El sáb., 22 sept. 2018 a las 15:11, Dirk Eddelbuettel<br>
| (<<a href="mailto:edd@debian.org">edd@debian.org</a>>) escribió:<br>
| ><br>
| ><br>
| > Jordi,<br>
| ><br>
| > On 22 September 2018 at 09:18, Georgi Boshnakov wrote:<br>
| > | I don’t see any code going with the revised version, but<br>
| > | looking at the code coming with the original paper, see <a href="http://economics.sas.upenn.edu/~jesusfv/RBC_codes.zip" rel="noreferrer" target="_blank">http://economics.sas.upenn.<wbr>edu/~jesusfv/RBC_codes.zip</a>,<br>
| > | the following points come up:<br>
| ><br>
| > All excellent points. Jordi, you should ask for the code. It really sounds<br>
| > like something done either naively, or with a goal in mind. "Rcpp code is<br>
| > C++ code" so any "N times" is silly -- setup costs, extra copies, ... etc pp.<br>
| ><br>
| > We may of course copy at the end from, say, bespoke C++ data structures to<br>
| > ours. But for any non-trivial example the cost of that will be well under, say, 1%<br>
| > while still getting a "many times" speedup over alternative R solutions. So<br>
| > a win for most people. Hence 1444 packages on CRAN using it. Those people<br>
| > aren't all fools ...<br>
| ><br>
| > Dirk<br>
| ><br>
| > --<br>
| > <a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
| > ______________________________<wbr>_________________<br>
| > Rcpp-devel mailing list<br>
| > <a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-<wbr>project.org</a><br>
| > <a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-<wbr>project.org/cgi-bin/mailman/<wbr>listinfo/rcpp-devel</a><br>
| <br>
| <br>
| <br>
| -- <br>
| Iñaki Ucar<br>
<br>
-- <br>
<a href="http://dirk.eddelbuettel.com" rel="noreferrer" target="_blank">http://dirk.eddelbuettel.com</a> | @eddelbuettel | <a href="mailto:edd@debian.org">edd@debian.org</a><br>
______________________________<wbr>_________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-<wbr>project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" rel="noreferrer" target="_blank">https://lists.r-forge.r-<wbr>project.org/cgi-bin/mailman/<wbr>listinfo/rcpp-devel</a></div></div></blockquote></div><br></div>