[Rcpp-devel] Question on performance

Kyle Baron kyleb at metrumrg.com
Sun Sep 23 15:29:49 CEST 2018


It didn't change anything in my testing.  I wondered about wrapping the
whole thing too ... but maybe that's premature?   I can't tell were the
slow-down is.

My ratio is around 2.4 or 2.5 with this:

https://github.com/jesusfv/Comparison-Programming-Languages-Economics/compare/master...kylebmetrum:master



On Sun, Sep 23, 2018 at 8:19 AM Dirk Eddelbuettel <edd at debian.org> wrote:

>
> On 23 September 2018 at 14:50, Iñaki Ucar wrote:
> | El dom., 23 sept. 2018 14:39, Dirk Eddelbuettel <edd at debian.org>
> escribió:
> |
> | >
> | > On 23 September 2018 at 13:01, Iñaki Ucar wrote:
> | > | Also you can try adding
> | > |
> | > | // [[Rcpp::plugins(unwindProtect)]]
> | > |
> | > | to InsideLoop.cpp. That should boost the performance too with the
> | > | latest version of Rcpp.
> | >
> | > Maybe, maybe not.  Are there lots of calls happening here?  Should be
> easy
> | > enough to add and then (micro)benchmark() from R.
> | >
> |
> | The Rcpp function is called inside a loop, so I would expect some gain.
>
> True, but alternatively any one of us with a modicum of Rcpp and C++ skill
> could wrap the whole subroutine so that only one call is needed.
>
> Dirk
>
> --
> http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20180923/b73c84a5/attachment.html>


More information about the Rcpp-devel mailing list