[R] R - How to "physically" Increase Speed
Prof J C Nash (U30A)
nashjc at uottawa.ca
Tue Oct 22 16:05:22 CEST 2013
The advice given is sensible. For a timing study see
http://rwiki.sciviews.org/doku.php?id=tips:rqcasestudy
We found that for optimization calculations, putting the objective
function calculation or parts thereof in Fortran was helpful. But we
kept those routines pretty small -- less than a page -- and we just
called them to evaluate things, avoiding passing around information back
and forth to R.
JN
On 13-10-22 06:00 AM, r-help-request at r-project.org wrote:
> Message: 58
> Date: Tue, 22 Oct 2013 05:47:15 -0400
> From: Jim Holtman <jholtman at gmail.com>
> To: Alexandre Khelifa <akhelifa at logitech.com>
> Cc: "r-help at r-project.org" <r-help at r-project.org>
> Subject: Re: [R] R - How to "physically" Increase Speed
> Message-ID: <73D989DA-B6B3-421D-838C-903DA34350F2 at gmail.com>
> Content-Type: text/plain; charset=us-ascii
>
> I would start with taking a subset of the data (definitely some that would run in less than 10 minutes) and use the profiler "Rprof" to see where time is being spent. you can use the the task monitor (if on windows) to see how much memory you are using; it sounds like you did not need the extra memory.
>
> You might see if you can partition your data so you can run multiple versions of R and then merge the results.
>
> Anything that takes more than a half hour, for me, is looked into to see where the problems are. For example dataframes arevexpensive to access and conversion to matrices is one way to speed it up. the is where the profiler helps.
>
More information about the R-help
mailing list