News for hackers. Stuff that matters.
Re:Performance comparison of Functional C++ 11, Java 8, Java... by cbsmith on Thursday June 05, 2014 @10:10PM (#7855853)
> Supposedly, Java is going to be faster than native code any day now.

You'll note that the FORTRAN native code is indeed beaten by Java.

Re:Performance comparison of Functional C++ 11, Java 8, Java... by mtdewcmu on Thursday June 05, 2014 @10:18PM (#7855882)
It's worth remembering that native code isn't fast automatically. An unskilled programmer, for instance, could easily write C++ that's slower than Java. There are a few possible reasons Fortran wasn't faster:

1. Fortran's compilers haven't advanced at the same rate as other languages due to its lack of popularity.

2. Fortran is inherently harder to optimize.

3. People have forgotten how to write fast Fortran, since no one uses it anymore.

I don't know which it might be.

Re:Performance comparison of Functional C++ 11, Java 8, Java... by tbirdz on Thursday June 05, 2014 @10:46PM (#7855972)
Fortran is actually easier to optimize than C or C++, as procedure arguments and variables cannot alias each other. Since C99, you can use the restrict keyword to enforce aliasing rules, but many C programmers don't do this, and the restrict keyword isn't even in C++.
Re:Performance comparison of Functional C++ 11, Java 8, Java... by praseodym on Thursday June 05, 2014 @11:12PM (#7856032)
But then again, things like the restrict keyword don't matter that much, except when using specialised compilers (e.g. for DSP chips).
Re:Performance comparison of Functional C++ 11, Java 8, Java... by cbsmith on Friday June 06, 2014 @12:48AM (#7856254)
Um no. It's a huge deal for heavy duty computational code, so much so that most performance oriented numeric libraries have extra code to workaround the case where restrict is not available..
Re:Performance comparison of Functional C++ 11, Java 8, Java... by cbsmith on Friday June 06, 2014 @12:51AM (#7856260)
Whatever the claims about Fortran, I would say that 3) is definitely not applicable here (two implementations provided, 2) is laughable (some people used to argue Fortran was the easiest to optimize) and 1) is true, but not in a way that would have a significant impact on this benchmark. Fortran compilers have been optimized over the years pretty extensively, and really of late the only reason to have a Fortran compiler is for efficient numerical computation, so that is something Fortran compiler writers have focused on.
Re:Performance comparison of Functional C++ 11, Java 8, Java... by aeroevan on Thursday June 05, 2014 @11:30PM (#7856073)
This was probably more of a case of 3.

Fortran compilers have been making quite some progress (particularly ifort, but gfortran isn't bad recently).

And due to the way multidimentional arrays are built into the language, aliasing isn't nearly as much of an issue for aggressive optimizations.