From Andreas.Weingessel@ci.tuwien.ac.at  Fri May 29 15:52:00 1998
From: Andreas.Weingessel@ci.tuwien.ac.at (Andreas Weingessel)
Date: Fri, 29 May 1998 16:52:00 +0200 (CEST)
Subject: performance of apply
In-Reply-To: <Pine.OSF.3.95.980529092504.31530A-100000@io.uwinnipeg.ca>
References: <6rlnrldvez.fsf@verdi.stat.wisc.edu>
 <Pine.OSF.3.95.980529092504.31530A-100000@io.uwinnipeg.ca>
Message-ID: <13678.52112.677406.807483@elendil.ci.tuwien.ac.at>



Maybe my point was not quite clear. I did not want to compute the row
sums of a certain matrix, I just wanted to demonstrate that the task
"apply a certain function to every row of a matrix" can take a very
long time, if it is done with the function "apply" which is of course
the most clear way to implement this task. I first came across this
problem when I made simulations on a data matrix with 15000 rows and
after adding one simple "apply" to my program, it suddenly seemed not to
finish at all.

If I just want make such a computation once, it might be not important
whether I wait a couple of seconds or 2 minutes or 5 minutes (as it
needs time for 15000 rows). But if I do some simulation where these
computations are repeated hundred times, there is a difference between
200 seconds or 200 minutes.

	Andreas

************************************************************************
*                          Andreas Weingessel                          *
************************************************************************
* Institut f=FCr Statistik      *                Tel: (+43 1) 58801 4541 =
*
* Technische Universit=E4t Wien *                Fax: (+43 1)  504 14 98 =
*
* Wiedner Hauptstr. 8-10/1071 *     Andreas.Weingessel@ci.tuwien.ac.at *
* A-1040 Wien, Austria        * http://www.ci.tuwien.ac.at/~weingessel *
************************************************************************

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel 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-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


performance of apply
Andreas Weingessel