[R] ^ operation much slower in R 1.7.1 than in R 1.7.0 ???
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Mon Aug 4 17:25:12 CEST 2003
"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)[3]
>
> 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))[3]
>
> took about 0.9 sec with R 1.7.0, and it takes 11.8 sec (!!!) in R 1.7.1.
>
> 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.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list