<div dir="ltr">Hi Ramon,<div><br></div><div>Nice to see that there are people stumbling upon Kmisc and finding it useful ;) It was developed partially in response to new BioConductor guidelines requiring packages with source code to register the entry points, and since that's a pain to do manually, and it was possible to automate...<br>
<br>I believe everything in the manual applies identically to C++ code -- in essence, the question is:<br><br> 1. Do we take a string, e.g. "C_do_something", and resolve that to some entry point dynamically, or<br>
2. Do we pre-resolve these entry points, cache them in the package, and then enter that way?<br><br>and so the second version should be marginally faster, but I doubt you would notice it unless you were calling that function from the R interpreter millions of times (and even then other overhead would dominate).<br>
<br>Cheers,<br>Kevin</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jun 25, 2014 at 12:11 PM, Ramon Diaz-Uriarte <span dir="ltr"><<a href="mailto:rdiaz02@gmail.com" target="_blank">rdiaz02@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Dear All,<br>
<br>
Does it make sense to use C routine registration<br>
(<a href="http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Registering-native-routines" target="_blank">http://cran.r-project.org/doc/manuals/r-release/R-exts.html#Registering-native-routines</a>)<br>
in a package that has C++ code and uses Rcpp? What are the pros and cons?<br>
<br>
<br>
All of my code is C++. Writing the relevant code for routine registration<br>
is not hard (it is actually automagic if one uses<br>
<a href="https://github.com/kevinushey/Kmisc/blob/master/R/registerFunctions.R" target="_blank">https://github.com/kevinushey/Kmisc/blob/master/R/registerFunctions.R</a>). But<br>
I wonder if it really makes sense to do this.<br>
<br>
I've googled around and I haven't been able to find much (maybe a problem<br>
of my google-fu). I've looked at packages in CRAN and BioConductor that<br>
import Rcpp and almost none, of those I've looked at, use registration<br>
(except for a few that use Kmisc's registerFunctions).<br>
<br>
<br>
Thanks,<br>
<br>
R.<br>
<br>
<br>
--<br>
Ramon Diaz-Uriarte<br>
Department of Biochemistry, Lab B-25<br>
Facultad de Medicina<br>
Universidad Autónoma de Madrid<br>
Arzobispo Morcillo, 4<br>
28029 Madrid<br>
Spain<br>
<br>
Phone: <a href="tel:%2B34-91-497-2412" value="+34914972412">+34-91-497-2412</a><br>
<br>
Email: <a href="mailto:rdiaz02@gmail.com">rdiaz02@gmail.com</a><br>
<a href="mailto:ramon.diaz@iib.uam.es">ramon.diaz@iib.uam.es</a><br>
<br>
<a href="http://ligarto.org/rdiaz" target="_blank">http://ligarto.org/rdiaz</a><br>
<br>
<br>
_______________________________________________<br>
Rcpp-devel mailing list<br>
<a href="mailto:Rcpp-devel@lists.r-forge.r-project.org">Rcpp-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/rcpp-devel</a></blockquote></div><br></div>