[Rcpp-devel] Rcpp::plugins - Unwinding protection

Dirk Eddelbuettel edd at debian.org
Fri Dec 3 19:27:28 CET 2021

On 3 December 2021 at 17:03, Iñaki Ucar wrote:
| On Fri, 3 Dec 2021 at 15:44, Víthor Rosa <vrosafranco at gmail.com> wrote:
| >
| > Thank you for your response. Adding my functions to an R package and changing the Makevars file as suggested reduced the runtime by half. Excited for Rcpp 1.0.8! :)
| Excellent! Glad it helped.

I have been sitting on a branch at GitHub that defines new / easier /
alternate header files as entry points. So instead of starting with Rcpp.h
(possibly combined with #define statements) one could now pick exactly one
off these three

   #include <Rcpp/Light>

   #include <Rcpp/Lighter>

   #include <Rcpp/Lightest>

which turn off, respectively, Modules, RTTI and Sugar. See the commit at [1]
for more and full code, it's essentially a define each and simple nesting.

Each of these shaves a little bit of the compile times.  (I need to rebase it
to current master, it's a few months old.)

But I had not yet convinced myself it would be useful / of interest.  But as
this thread shows, there may be interest.  Any comments? Yay? Nay?

(And as discussed turning UNWIND_PROTECT on globally is also a good idea but
may need a proper transition, and is hence for now outside the scope of this


[1] https://github.com/RcppCore/Rcpp/commit/5cf57ff663d06acf42124feae51d469f3f77be52#diff-05c80375618a46d399d73e4f32a3006aa698b9bb293a37c6d2e431a1c541b7bb

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

More information about the Rcpp-devel mailing list