[R] question about performance on different operating systems

Prof Brian Ripley ripley at stats.ox.ac.uk
Thu Dec 13 09:22:27 CET 2001


On Thu, 13 Dec 2001, Philippe Grosjean wrote:

> Objet : Re: [R] question about performance on different operating
> systems
>
>
> >Prof Brian Ripley <ripley at stats.ox.ac.uk> writes:
>
> > In my experience R under Windows is about 10-20% slower than Linux on the
> > same box. We know about 5% of the difference (polling vs interrupts) and
> > th rest seems to be down to compiler quality (yes, they are both i686 gcc,
> > but still not too similar compilers often giving different answers).
>
>
> It depends of course also which tasks are running behind the scene, and
> Windows is installing a lot of stupid utilities to "make thinks easier". For
> instance, by default, the system regularly checks the CD-rom drive(s) (every
> second or so) to detect if a new CD-rom is inserted and to possibly run an
> autoexecutable on it. In comparison, on Linux, you have to explicitly mount
> the CD. If someone install Adapted DirectCD to write directly on CD-R(W), it
> further look at the CD-writer at regular intervals. The same for Iomega
> utilities for the Zip/Jaz drives, etc, etc, etc.

I was comparing CPU time for the R process, not elapsed time (but the R
process does manage to use practically 100%).  Linux has considerably more
system processes running than Windows, and AFAIK on current Windows (that
is, NT-based)  the things you describe are driven by interrupts and not by
polling.  Certainly I see no significant resources going on system
activities, even less so than on Linux.  (Most of my timings are on
a dual-CPU machine where the other CPU can do the system tasks, anyway.)

Peter was right to raise the issue of the run-time system (`library').
That is a difference, but Visual C++ definitely creates faster code using
the same run-time as i586-mingw-gcc, so there is room for improvement.
(I choose to build DLLs for S+6 using VC++ after quite a bit of
performance testing.)


> Anyway, it is a fact that Linux is faster than Windows on the same box.

It is at best an empirically supported observation.

> However, a 10-20% difference between systems seems acceptable to me. On the
> other hand, if R is 10 times slower under MacOS 9.1, it is important to
> know. In this case, there are chances that its performances are quite
> similar to Linux under MacOS X. If this is the case, I believe it is
> critical to warn the user and avise him to install R under MacOS X
> preferrably on a Mac box.

That's only likely to be true for the MacOS X port of R.  One of my recent
visitors was using Stefano's port under MacOS X, and it did seem to be
slow and have memory management problems on quite modest tasks.

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