In R when using the cxxfunction from the inline package, how does one change the optimization flag for the cpp compiler?
By default, on my machine, it compiles with -g -O2. But I would like to use the -O3 optimization to gain speed. I use the Rcpp plugin if that makes any difference.
I have tried creating my own plugin, and I have tried to set the different arguments of the cxxfunction but nothing worked.
I guess one option would be to compile it using R CMD SHLIB instead of using cxxfunction. But Rcpp recommends the use of inline because most of their test cases are using it.
thanks for your help, let me know if you need any clarification