4 ms·
What is the benefit of using Julia over R?
by gerbler 6y ago
What is the benefit of using Julia over R?
- socialdemocrat 6y agoA more user-friendly, versatile and higher performance language. E.g. Julia can do everything R, Python, Fortran, Matlab and C can do in principle all in one language. You can use R and Python packages from Julia. You can call Fortran and C code from it. Unlike R and Python you don't need to have a module rewritten to C or Fortran code to get high enough performance. In fact Julia will often outperform C and Fortran code. There are researchers which have switched from Fortran to Julia to get a higher productivity programming language expecting to get a performance drop only to realize they got a 3x performance increase. The main downside of Julia is that it is a very new language. R and Python and old and hence well known, but Julia is a rapidly growing and taking over serious areas. Next generation climate models are built using Julia e.g.
- gerbler 6y agoThanks for explaining! I've used R for a lot of data-visualization (and become familiar with the idiosyncrasies of many packages) so it's nice to know that it's compatible.
- dTal 6y agoOn performance: Julia really demonstrates the difference between "theoretically fast" and "actually fast in practice". In theory, maybe I could outperform my Julia program in C with careful thought about cache strategies and so forth, the same way I could outperform my C code with hand tuned assembly. In practice, the ability to prepend a 'for' loop with 'Threads.@threads' and suddenly the loop runs in parallel - or the ability to declare an array as type 'cuArray' and suddenly all operations on it run on the GPU - means that it's vastly easier for me to write fast Julia code than fast C code.