[R] fastest R platform

Douglas Bates bates at stat.wisc.edu
Mon Apr 9 14:34:52 CEST 2001


"M. Edward Borasky" <znmeb at aracnet.com> writes:

> The first step in performance tuning scientific code is to rewrite it so the
> flow of control, especially the loop structure, is *crystal clear* and
> obvious to the casual observer. Once you've done that, focus on the
> innermost loops -- those sections that are executed on the order of the cube
> of the problem size or higher. It is rare for scientific code to be higher
> order than the cube of the problem size, although I've seen it in
> computational chemistry.
> 
> Once you've isolated the spots that are being executed most often, try
> replacing scalar operations with vector operations and vector operations
> with matrix operations. These are usually translated fairly efficiently by
> modern compilers, and special assembler level packages can be found for
> things like the Basic Linear Algebra Subroutines (BLAS).

Profiling the R code can help in isolating the parts that are taking
the most time.  See the "Writing R Extensions" manual for details on
how to do this.
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list