Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is certainly a good thing (for speed) that the majority of lines of R are written in C. I used to work in a shop that did much of our development in R. We always used to joke "R is really fast if you write it in C".


R is quite slow, but there are two ways to improve this state of affairs.

1. Use the functional style stuff rather than loops ( i.e. especially the apply family of functions)

2. For large data sets avoid the default memory management which involves loading everything into memory all at once. The sqlite dataframe stuff is probably a good default for larger data sets :)

It's still slow though.


R has always been a niche language/platform for dataists/statisticians and because of that it really hasn't had the contributions of programming language developers and modern techniques.

It'd be cool to see R evolve more quickly as a language (implementation wise). We're getting hints of it with the new byte code compiler though.

That would be ideal.


It's a common misconception that applys are faster than for loops. A for loop is faster than apply(). But lapply(), sapply(), mapply() are plenty fast.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: