[R] An "R is slow"-article

Alberto Monteiro albmont at centroin.com.br
Wed Jan 9 17:17:30 CET 2008


[article: http://fluff.info/blog/arch/00000172.htm ]

Duncan Murdoch wrote:
> 
> If I followed Blair's advice and did everything in C, then 
> development would take much longer, the code would be much buggier 
> (even his example has bugs, and he admits it!!) and all those cases 
> where R is fast enough would just never get done.
> 
I was particularly horrified by this comment:

  The reader well-versed with Apophenia will notice that there is
  a memory leak, because apop_test_fisher_exact returns an apop_data
  struct that never gets freed. But 10,000 lost matrices didn't affect
  the speed of the program at all. The lesson from this is that the
  details of memory management that R is handling for you are not
  such a big deal on a modern PC anyway. 

So, he does a C code that _doesn't_ check if there is memory before
allocating things, then _doesn't_ free memory when it finishes, and
naively says that C is 50 times faster than R?

Alberto Monteiro




More information about the R-help mailing list