[Rd] (PR#10696) maybe a bug in the system.time() function?

Hin-Tak Leung hin-tak.leung at cimr.cam.ac.uk
Mon Feb 4 19:22:34 CET 2008

You will get yelled at by others for posting a question as a bug... 
(sigh). See FAQ.

That said, your understanding of the output of system.time() is wrong.
The value you are after is simply user+system. %CPU is essentially
user+system/elapsed. It is elapsed which is dependent on system
load, not the other two (usually).

Back into replying more in the usual R-devel sarcastic style... if you 
don't understand what user/system/elapsed means, you really have no
place studying CPU loads...

iacob at ceremade.dauphine.fr wrote:
> Full_Name: Alessandra Iacobucci
> Version: 2.5.1
> OS: Mac OS X 10.4.11
> Submission from: (NULL) (
> Hi,
> I am making some intensive simulations for the testing of a Population Monte
> Carlo algorithm. This involves also a study of the CPU times in two different
> case.
> What I am trying to measure is the "real" CPU time, the one which is independent
> on the %CPU. 
> I'm using the "system.time" function with gcFirst=TRUE and I realized that all
> of the output values (user, system and elapsed) depend on the percentage of the
> CPU, meaning that if your program is the only one running on the machine,
> system.time() gives you  certain values, and if there are many programs running
> at the same time, for the exact same simulation system.time() gives you much
> higher values.
> Thanks for you answer.
> Best regards,
> Alessandra Iacobucci
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

More information about the R-devel mailing list