performance of apply

Andreas Weingessel
Fri, 29 May 1998 16:52:00 +0200 (CEST)

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 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 * *
* A-1040 Wien, Austria        * *

r-devel mailing list -- Read
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: