[R] ^ operation much slower in R 1.7.1 than in R 1.7.0 ???
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Aug 4 18:45:11 CEST 2003
And are you able to give an explanation? For example, did you compile
each under the same compiler system?
I doubt if this is worth R-core's time to pursue, so over to interested
users to find an explanation and fix.
On Mon, 4 Aug 2003, James MacDonald wrote:
> I get similar results as Philippe on WinXP (1.33 GHz laptop, 512 Mb
> R 1.7.1
> 2.86 sec
> 7.82 sec
> R 1.7.0
> 0.64 sec
> 1.64 sec
> James W. MacDonald
> Affymetrix and cDNA Microarray Core
> University of Michigan Cancer Center
> 1500 E. Medical Center Drive
> 7410 CCGC
> Ann Arbor MI 48109
> >>> Peter Dalgaard BSA <p.dalgaard at biostat.ku.dk> 08/04/03 11:30AM >>>
> "Philippe Grosjean" <phgrosjean at sciviews.org> writes:
> > I do not understand what happens here (under Win XP):
> > a <- abs(matrix(rnorm(800*800)/2, ncol=800, nrow=800))
> > system.time(b <- a^1000)
> > took about 1 sec on my computer with R 1.7.0 and it takes now 4.59
> sec with
> > R 1.7.1
> > Similarly,
> > phi <- 1.6180339887498949
> > a <- floor(runif(750000)*1000)
> > system.time(b <- (phi^a - (-phi)^(-a))/sqrt(5))
> > took about 0.9 sec with R 1.7.0, and it takes 11.8 sec (!!!) in R
> > Are there some changes made between 1.7.0 and 1.7.1 that could cause
> such a
> > large difference in time to do such simple computations???
> Hmm, on linux, I get approx 0.31 for the first example with 1.7.0,
> 1.7.1, r-patched, and r-devel. Similarly, I get 0.8 for the second ex.
> in all four cases.
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 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help