[R] R perfomance question !!!
ansolid at gmail.com
Thu Jun 19 08:09:23 CEST 2008
The main task is computing of consistently received data. I have a function
named "GiveNextDataPortion()" that returns the list object. The number of
function's calls is about 5 millions and thus, I encountered a problem of
I use this script:
5 millions iterations of "while" loop takes about 20 seconds on my computer,
it is very quickly, but adding some simple extra operators increases the
time of test a lot.
It will already take more than 10 minutes.
Have you any ideas about the optimization of this test?
Roland Rau-3 wrote:
> diver495 wrote:
>> Using Visual Basic I can complete the same script (simple loop of 5000000
>> itterations) in 0.1 sec.
>> Is it realy R not suitable for huge computing.
> If you are happy with Visual Basic, then there is no need for you to use
> In case your message was not a flamebait, it is well known that loops
> like these are often bottlenecks for R.
> There are many resources how to easily avoid them. See, for example, "S
> Programming by Venables and Ripley or John Chambers' book: Programming
> with data.
> Even searching the mail archive for subject like "avoid loops" might be
> You might also consider checking functions like apply, tapply, ...
> It seems there is also a good book available for scientific computing
> with Visual Basic:
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
View this message in context: http://www.nabble.com/R-perfomance-question-%21%21%21-tp17984154p17997925.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help