[R] Time-travelling laptop, or problem with system.time?

Rense contact at rensenieuwenhuis.nl
Sat Nov 1 13:19:28 CET 2008

Playing around with my new laptop (Macbook, 2.4Ghz), I encountered
unexplained timings using system.time.

I did the following:

> X <- Matrix(rnorm(1e6), 1000)
> system.time(for(i in 1:25) X%*%X)
user system elapsed
8.306 0.591 5.031
> system.time(for(i in 1:25) solve(X))
user system elapsed
8.933 1.331 6.684
> system.time(for(i in 1:10) svd(X))
user system elapsed
36.989 3.665 33.384

>From R-News I got the following description:

"The returned value consists of user time (CPU time R needs for
calculations), system time (time the system is using for processing
requests, e.g., for handling files), total time (how long it really took to
process the command) and — depending on the operating system in use — two
further elements."

Do I misunderstand these timings, or is my laptop indeed capable of time

Kind regards,


View this message in context: http://www.nabble.com/Time-travelling-laptop%2C-or-problem-with-system.time--tp20279832p20279832.html
Sent from the R help mailing list archive at Nabble.com.

More information about the R-help mailing list