Re: [Rcpp-devel] Linking to c++ files in a package without Rcpp overhead for faster computation

2015-03-06 Thread Qiang Kou
Hi, John, Making your code header-only is your best choice and it will make everything easier. If header-only is impossible, this can happen, there is one trick you may want to try. As I remember the early version of Rcpp, maybe before 0.9, it builds a libRcpp.so when installing Rcpp. You can a

Re: [Rcpp-devel] Linking to c++ files in a package without Rcpp overhead for faster computation

2015-03-06 Thread Dirk Eddelbuettel
On 6 March 2015 at 17:09, JJ Allaire wrote: | The overhead comes from the fact that the parameters are converted | to/from SEXP and pushed through a C interface. There's also overhead | that's associated with error checking, etc. This is a fixed overhead | so as more work gets done inside your C++

Re: [Rcpp-devel] Linking to c++ files in a package without Rcpp overhead for faster computation

2015-03-06 Thread JJ Allaire
The overhead comes from the fact that the parameters are converted to/from SEXP and pushed through a C interface. There's also overhead that's associated with error checking, etc. This is a fixed overhead so as more work gets done inside your C++ function the % overhead will approach zero. In term

[Rcpp-devel] Linking to c++ files in a package without Rcpp overhead for faster computation

2015-03-06 Thread John Tipton
Hey Rcpp developers, I am brand spanking new to the Rcpp community and I want to introduce myself with what is likely a very simple question that I haven't found an answer for yet. My question is on package development and linking c++ files from one package directly to another package without havi