On Fri, Sep 10, 2010 at 10:23 AM, Henrik Bengtsson <h...@stat.berkeley.edu> wrote: > Don't underestimate the importance of the choice of the algorithm you > use. That often makes a huge difference. Also, vectorization is key > in R, and when you use that you're really up there among the top > performing languages. Here is an example from the official R wiki > illustrating my points: > > http://rwiki.sciviews.org/doku.php?id=tips:programming:code_optim2 > > My rule of thumb is: > > Any piece of code can be made twice as fast.
I second this point - the latest version of reshape is 100x faster in some situations because I came up with a better vectorised algorithm - it's still all in R. Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice University http://had.co.nz/ ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.