[R] Puzzled by what Rprof is telling me

Thomas Lumley
Tue, 11 Jun 2002 18:03:23 -0000

On Tue, 11 Jun 2002, Don MacQueen wrote:

> I am using Rprof() to help find ways to improve performance.
>
> I found a function whose total seconds and self seconds were large. I
> replaced it with something else. The something else had a small
> number of total seconds and self seconds. But the total time did not
> decrease.

This is strange. Are you sure that nrow isn't used by any of the functions
you call?  It's possible that your explicit use of nrow() took lots of
total seconds but few self seconds, and that another hidden use did the
reverse.

	-thomas