Linked by ebasconp on Fri 10th Jun 2011 22:22 UTC
Benchmarks "Google has released a research paper that suggests C++ is the best-performing programming language in the market. The internet giant implemented a compact algorithm in four languages - C++, Java, Scala and its own programming language Go - and then benchmarked results to find 'factors of difference'."
Thread beginning with comment 476997
To read all comments associated with this story, please click here.
Comment by StaubSaugerNZ
by StaubSaugerNZ on Sat 11th Jun 2011 20:19 UTC
StaubSaugerNZ
Member since:
2007-07-13

In *general* the fastest language is (yukk) FORTRAN. This is becasue F77 lacks pointer aliasing that hamper optimization for C and C++ compilers.

But who wants to develop in FORTRAN? or C++ for that matter?

James Gosling reports that the French scientific computing institute INRIA already evaluated Java for High-Performance Computing (HPC) in 2008 and found it faster than C (which is generally faster than C++):
http://blogs.oracle.com/jag/entry/current_state_of_java_for

They found the principle limitation for HPC was the Java networking library.

This study was in 2008 and the JVM has not gotten slower in that time.

Reply Score: 3

RE: Comment by StaubSaugerNZ
by Magma on Sat 11th Jun 2011 20:35 in reply to "Comment by StaubSaugerNZ"
Magma Member since:
2006-03-07

Turbo Pascal was pretty fast. Never really caught on, except for Delphi and a few other niche languages.

I think that Free Pascal typically ranks very high high in performance benchmarks.

Reply Parent Score: 1

galvanash Member since:
2006-01-25

Turbo Pascal was pretty fast. Never really caught on, except for Delphi and a few other niche languages.


I programmed in Delphi for a few years back when it was still fairly popular. Borland's Pascal compilers were very fast as far as compilation speed goes... Compared to pretty much any C/C++ compiler it was at least an order or magnitude faster (or more even - mostly due to it's single pass nature).

However, it did very little as far a optimizing the performance of the resulting executable (also at least partially due to it being a single pass compiler). It was fairly dumb to be honest. It did default to using registers for parameter passing and avoided building a stack when it could, but other than that it didn't do much of anything interesting.

I don't know much about free pascal, but I see it at least has SSE support, something that Delphi never had back in the day (it was purely x87 unless you did SSE explicitly using 3rd party libs). I would be quite surprised to see a single pass pascal compiler doing the kind of trans-formative optimization that you get from GCC or other modern compilers. There are many types of optimization that are simply not possible without multiple passes.

Reply Parent Score: 2

RE[2]: Comment by StaubSaugerNZ
by f0dder on Mon 13th Jun 2011 16:53 in reply to "RE: Comment by StaubSaugerNZ"
f0dder Member since:
2009-08-05

Turbo Pascal, fast? Heh.

As noted belov, the compiler was fast, especially in the TP6 days - compiling directly to RAM was a nice productivity boost on the PIO harddrives back then.

But the compiler was naïve, and with the slow CPUs back then you often needed to resort to inline BASM for even simple stuff... anybody remember Sally's Peephole Optimizer? And anybody else around who rewrote (parts of) the CRT?

Things didn't improve much with Delphi either, except CPUs had become fast enough that it wasn't so relevant anymore.

Reply Parent Score: 1