4 ms·
As the Ars comments make clear, with the exception of Julia none of these languages has any chance of wide adoption under the broad umbrella of "scientific comp
by gammarator 12y ago
As the Ars comments make clear, with the exception of Julia none of these languages has any chance of wide adoption under the broad umbrella of "scientific computing."
For a defense of the numerical/scientific computing tradition of which FORTRAN is the ne plus ultra, see this article: http://www.evanmiller.org/mathematical-hacker.html http://www.evanmiller.org/mathematical-hacker.html
It's telling of the Ars author's lispy blinders that he gives recursive examples for computing Fibonacci numbers. As the linked article makes clear, this is ridiculous because there's a closed form solution:
"""
long int fib(unsigned long int n) {
return lround((pow(0.5 + 0.5 * sqrt(5.0), n) -
pow(0.5 - 0.5 * sqrt(5.0), n)) /
sqrt(5.0));
}
No recursion (or looping) is required because an analytic solution has been available since the 17th century."""
- walshemj 12y agoJulia appears to be to slow for a lot of large real-world uses - this is where the power cost of running the cluster becomes important. There is a job posting outstanding near me for over a year looking for some one to port CFD Fortran to C++ - I have never had to stifle giggles when talking to a recruiter before. They would better of training their new staff in Fortran after all that's what I did at BHRA. I suspect its ARA out at twinwoods - one would hope my old employer isn't so silly.
- KenoFischer 12y ago> Julia appears to be to slow for a lot of large real-world uses I'm curious what kind of application you are referring to and where you get that impression. We are always looking for examples where we don't get good performance, so we can optimize, so I'd love to hear your experiences.
- walshemj 12y agowell I was going off stack overflow http://stackoverflow.com/questions/20613817/julia-julia-lang-performance-compared-to-fortran-and-python http://stackoverflow.com/questions/20613817/julia-julia-lang... where even with hand tuning the Julia code its a lot slower than Fortran. I as thinking of large scale CFD work ie simulating two-phase flow in a nuclear reactor or a simulation of airflow over aero systems - which is where I suspect that job I mentioned is based. Must have a look at Julia after I have finished teaching myself Java (Spit!) for hadoop
- KenoFischer 12y agoOk, looking at the code is seems like you could probably get another 2x by switching to views rather than slices which will be the default sometime in the julia 0.4 timeframe. That would probably put julia perforamance at 1.2-1.5x Fortran, which while there of course is always more optimizations to be done is at least pretty good.
- alecdbrooks 12y agoThe author of the article is aware of the article you linked to and wrote a response: http://lee-phillips.org/lispmath http://lee-phillips.org/lispmath. The problem with the closed form is that once it exceeds the built-in data types, it no longer takes constant time to compute, so it's not actually always faster than doing it iteratively. Apparently, the ideal method is "none of the above" but to use matrix exponentiation (or a formula derived from it) instead: http://nayuki.eigenstate.org/page/fast-fibonacci-algorithms http://nayuki.eigenstate.org/page/fast-fibonacci-algorithms.