[R] ^ operation much slower in R 1.7.1 than in R 1.7.0 ???
James MacDonald
jmacdon at med.umich.edu
Mon Aug 4 17:46:22 CEST 2003
I get similar results as Philippe on WinXP (1.33 GHz laptop, 512 Mb
RAM).
R 1.7.1
2.86 sec
7.82 sec
R 1.7.0
0.64 sec
1.64 sec
Jim
James W. MacDonald
Affymetrix and cDNA Microarray Core
University of Michigan Cancer Center
1500 E. Medical Center Drive
7410 CCGC
Ann Arbor MI 48109
734-647-5623
>>> 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)[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
______________________________________________
R-help at stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
More information about the R-help
mailing list