[R] fastest R platform
tlumley at u.washington.edu
Mon Apr 9 17:01:54 CEST 2001
On Sun, 8 Apr 2001, M. Edward Borasky wrote:
> 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).
> While there are faster things on the market than a 700 MHz Pentium, they
> aren't cheap and aren't necessarily going to be a whole lot faster unless
> you go to some effort in tuning your code. Fortunately, R allows linking
> easily with major chunks of C or FORTRAN code. Again, the key is knowing
> *precisely* where your code is spending its time.
In particular, look at the R profiler, described in the first issue of the
On platforms: R performs at similar speed between Windows and Linux, and
my limited comparisons between Intel and SPARC machines suggest that the
SPECint rating will give a reasonable ballpark estimate of speed across
platforms. This means you probably don't want to shift off Intel for
speed reasons unless you have a LOT of money.
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