[Rcpp-devel] Rcpp "version" of R's match function

Hadley Wickham h.wickham at gmail.com
Thu Nov 15 14:52:55 CET 2012


> R
> utilisateur     système      écoulé
>       0.338       0.024       0.362
> R (second time)
> utilisateur     système      écoulé
>       0.262       0.000       0.262
> match_ manual Rcpp
> utilisateur     système      écoulé
>       0.144       0.000       0.144
> match__ internal Rcpp
> utilisateur     système      écoulé
>       0.134       0.000       0.133

Nice!

> Worth noting that the R version gets better the second time. I guess R keeps
> its hash table somewhere.

Hmmm - see http://cran.r-project.org/web/packages/fastmatch/index.html

Hadley

PS.  Would you be interested in a set of R functions that from a quick
skim of the R sources that I think could be much much faster if
implemented in Rcpp?

-- 
RStudio / Rice University
http://had.co.nz/


More information about the Rcpp-devel mailing list