[Rcpp-devel] Question on performance
Dirk Eddelbuettel
edd at debian.org
Sat Sep 22 15:11:40 CEST 2018
Jordi,
On 22 September 2018 at 09:18, Georgi Boshnakov wrote:
| I don’t see any code going with the revised version, but
| looking at the code coming with the original paper, see http://economics.sas.upenn.edu/~jesusfv/RBC_codes.zip,
| the following points come up:
All excellent points. Jordi, you should ask for the code. It really sounds
like something done either naively, or with a goal in mind. "Rcpp code is
C++ code" so any "N times" is silly -- setup costs, extra copies, ... etc pp.
We may of course copy at the end from, say, bespoke C++ data structures to
ours. But for any non-trivial example the cost of that will be well under, say, 1%
while still getting a "many times" speedup over alternative R solutions. So
a win for most people. Hence 1444 packages on CRAN using it. Those people
aren't all fools ...
Dirk
--
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
More information about the Rcpp-devel
mailing list