Live data from Hacker News

Intel Fortran now 20% faster than C, fastest language on Shootout

shootout.alioth.debian.org

11–20 of 53 posts

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#12
post #7

These reports are worse than useless. Any person with good understanding of computing knows that implementation plays a huge part in it. Why people wasting their time comparing speed of different programming languages while they should focus on different implementations. I guess the latter one is difficult so people all try to avoid it, and the first one is just so easy to do and everybody is doing it.

Which of course the web site freely acknowledges. At the bottom of that page states the real question is "Which of these programming language implementations have the fastest benchmark programs?"

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#13
post #8
post #7

These reports are worse than useless. Any person with good understanding of computing knows that implementation plays a huge part in it. Why people wasting their time comparing speed of different programming languages while they should focus on different implementations. I guess the latter one is difficult so people all try to avoid it, and the first one is just so easy to do and everybody is doing it.

That fact stands out immensely. The Scala code and java code should be equal as the first can be written exactly like the second. Don't even see Clojure. Hate to see what times they get there.

Clojure is there but where is clang?

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#15

Intel Fortran vs gcc ??? How about Intel Fortran vs. Intel C ? How about gcc C vs. gcc Fortran ? Hyper-optimized compiler for Intel architecture beats compiler designed to be portable to many, many target architectures? Not very shocking.

This. ICC is known to beat gcc usually.

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#16
This is a really terribly done study, with a misleading title to boot.

First, even if we take the conclusion as given, "Fortran" isn't faster than "C". The median of one set of programs, compiled with one Fortran compiler with one set of options and run on one processor, is faster than the median of another set of programs compiled with one C compiler with one set of one and run on that processor. This tells us approximately nothing.

If you only expand your consideration to include the whole distribution of programs they tested, GCC actually looks better than iFort (eg. there is a single program which ran 2x faster with iFort, but multiple programs ran more than 2x slower). Median is a spectacularly poor choice of metric, especially with so few samples in the distribution.

But also: Intel also makes a C compiler. Why wasn't that used? How were these benchmark programs chosen? Etc.

This study says close to nothing about "Fortran" and "C", or about any of the other languages involved.

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#17
post #3

With Fortran this is expected, since for language semantics the compiler can perform more assumptions compared to C, resulting into more optimizations.

For the shootout, all the source code is visible to the compiler (though at least GCC needs to be told so with a flag). So I don't think there's much more assumptions that can be made.

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#18
post #17
post #3

With Fortran this is expected, since for language semantics the compiler can perform more assumptions compared to C, resulting into more optimizations.

For the shootout, all the source code is visible to the compiler (though at least GCC needs to be told so with a flag). So I don't think there's much more assumptions that can be made.

AFAIK GCC doesn't add "restrict" to pointers by itself. Fortran semantics mean that pointers are "restrict" by default.

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#19
post #17

Earlier quoted context omitted.

For the shootout, all the source code is visible to the compiler (though at least GCC needs to be told so with a flag). So I don't think there's much more assumptions that can be made.

AFAIK GCC doesn't add "restrict" to pointers by itself. Fortran semantics mean that pointers are "restrict" by default.

How does this matter when the compiler can see all the source code? It can see what the pointers are pointing to and determine if there is aliasing.

Feel free to point out the source code in the shootout where this would somehow not be the case. Shouldn't be hard to find if you focus on the benchmarks where Fortran beats C heavily.

Additionally, the argument about restrict is flawed because it can be added to the C code too, so it can't be an advantage of Fortran.

Re: Intel Fortran now 20% faster than C, fastest language on Shootout

#20
Fortran was designed to munch numbers. As most programs are written by people who will not spend much time getting that last 3x of performance out, a language like Fortran makes sense for the number crunchers. Its easier to screw up in C. These kinds of tests are not all that great, as the code is optimized. Its un-optimized code that matters, since that powers the world.
Post reply on HN