[R] fastest R platform

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Apr 9 17:16:47 CEST 2001

On Mon, 9 Apr 2001, Thomas Lumley wrote:

> 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
> R newsletter.

It has never been clear to me in this thread what OS the PC concerned is
running.  Not all OSes can run the profiler, which is very useful but
coded in rather specific way.  Implementing profiling on Windows is
an open project.

> 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.

And before you do you probably want to examine the possibilities of
parallelization on cheap Intel i686 boxes.  I know R is not parallel,
but most statistical tasks are parallelizable.

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

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