[R] flops calculation

Thomas Lumley tlumley at u.washington.edu
Mon Oct 29 15:49:22 CET 2007


On Sun, 28 Oct 2007, kevinchang wrote:

>
> Hi all,
>
> Since proc.time return three different kind of times (user, system and
> elapsed) , I am wondering which one is right for calculating flops.

Probably none of them.  The 'user'+'system' time is the amount of CPU time 
that can be blamed on R.  For most applications this time is mostly not 
used in floating point calculations, so it doesn't really seem meaningful 
to use it in a denominator and call the result 'flops'.

Sometimes even the 'user'+'system' time is an underestimate of R's 
resource use -- for example, indexing a large file in RSQLite takes a long 
elapsed time with relatively little user or system time, apparently 
because the system is waiting for disk seeks [the disk is being treated as 
a random-access device].

 	-thomas



Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



More information about the R-help mailing list