3 ms·
R is very, very slow compared to all the other programming platforms (including Ruby, a nice language but with some of the slowest implementations out there).
by flavio81 9y ago
R is very, very slow compared to all the other programming platforms (including Ruby, a nice language but with some of the slowest implementations out there).
R syntax is very unlike most programming languages so jumping to other languages can feel strange.
Python with Numpy, SciPy and Pandas, is the current widespread alternative to R and a good starting point. Recommended!!
- nnm 9y agoFor all the cases I worked on, R is not slow at all. At home, I wrote a R package to do deep learning (include most common layers, but only conv layer was implemented in C++) from scratch, and I also wrote one in python (using numpy + numba). My R version is same fast as python on the MNIST dataset (without conv layers, hence all code is in plain R or python).
- flavio81 9y agoWhat this means is that for your purposes R is fast enough. But in the absolute sense (or in any case, relative to other programming platforms), R is one of the slowest ever. R is usually slower than Python, and Python in some cases can be 100x slower than C. Performance, assuming identical hardware, depends on the program itself (that is, on what you are trying to calculate or compute or perform), but if you choose many different programs you can have a comparison between platforms ("platform" in this case means combination of programming language plus compiler or interpreter.) Here is a graphic comparing Julia to other platforms: https://julialang.org/benchmarks/ https://julialang.org/benchmarks/ You can see that according to that graphic, R can be up to 400x slower than Julia (or C). There is another independent benchmark here. It does not include R but it includes Python, and it's very interesting. http://benchmarksgame.alioth.debian.org/ http://benchmarksgame.alioth.debian.org/ But the best comparison graphs are here, this is worth a look: http://blog.gmarceau.qc.ca/2009/05/speed-size-and-dependability-of.html http://blog.gmarceau.qc.ca/2009/05/speed-size-and-dependabil...
- ferdterguson 9y ago> Python in some cases can be 100x slower than C Yeah, the Python implemented version is. But people doing serious computing in Python that requires speed are doing it with NumPy or even Cython or just straight up calling C/Fortran libraries in Python.
- fourthark 9y agoIt's the same in R - you can have good performance of you use vectorized routines, because those routines are written in C/C++/Fortran.