[R] variations in how long commands take
Guido Masarotto
guido at sirio.stat.unipd.it
Tue Jul 17 20:20:06 CEST 2001
On Tue, Jul 17, 2001 at 01:58:12PM -0400, David Kane <David Kane wrote:
> > m <- matrix(1, 400, 40000)
> > proc.time(x0 <- apply(m, 2, sum))
> [1] 21.88 3.16 40.13 0.00 0.00
>
> So far, so good. This is more than twice as fast as the same thing in S+
> 6.0. But when I re-issue this command, I get:
>
> > proc.time(x0 <- apply(m, 2, sum))
> [1] 37.09 4.65 63.13 0.00 0.00
> > proc.time(x0 <- apply(m, 2, sum))
> [1] 52.34 5.44 85.29 0.00 0.00
>
> So, my first question is: Why do the times keep going up? I first assumed that
>From help(proc.time)
`proc.time' determines how much time (in seconds) the currently
running R process already consumed.
Perhaps, you want to look to the help page of 'system.time'.
guido
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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