[R] Speed up R

Moshe Olshansky m_olshansky at yahoo.com
Thu Jun 21 02:28:20 CEST 2007


Robert McFadden writes:

>Dear R Users,
>I hope that there is someone who has an experience
>with a problem that I
>describe below and will help me. 
>I must buy new desktop computer and I'm wondering
>which processor to choose
>if my only aim is to speed up R. I would like to
>reduce a simulation time -
>sometimes it takes days. I consider buying one of
>them (I'm working under
>Win XP 32 bit):  
>1. Intel Core2 Duo E6700 2.67 GHz
>2. Dual-Core Intel Xeon processor 3070 - 2,66 GHz
>3. AMD Athlon 64 X2 6000+
>Or simple Pentium 4?
>
>I'm very confused because I'm not sure whether R
>takes advantage dual-core
>or not. If not, probably Athlon would be better,
>wouldn't be? 
>I would appreciate any help.
>Rob

Hi Robert,

Let me suggest you a "dirty" solution - if simulations
take days and you must run them many times I would
have rewriten them, let say, in C.  I had a program in
Matlab which took more than an hour to run and I had
to run it many times, so I usually prepared a few
runs, started them in the evening before leaving the
office and got the results next morning.  After a
while I have re-written it in C (this took me a few
days) and got a spead-up factor of about 100, so that
now the run took just a few minutes!
Languages like R and Matlab are extreemely convenient
but if performance is a very important issue you shoul
use C, Fortran, C++, etc.

Regards,

Moshe Olshansky.



More information about the R-help mailing list