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'."
Permalink for comment 476939
To read all comments associated with this story, please click here.
RE[6]: GCC isn't all that great
by Neolander on Sat 11th Jun 2011 10:57 UTC in reply to "RE[5]: GCC isn't all that great"
Neolander
Member since:
2010-03-08

Sorry, but I fail to find where the code I showed is "less understandable". It is actually a very well known technique, i.e., reduce the number of unneeded comparisons.

I was thinking about how you used trigraphs and put the loop's iterator inside of the loop's body instead of putting it within the for() itself.

Anyway, it was used only to point out one of the many gross assumptions people do about code efficiency, compiler optimizations and related stuff. We clearly should teach more about algorithms than about languages like we do today.

But then wouldn't there be a feeling among both students and their future employers that they have learned lots of pretty theory, but not how to actually do things in practice ?

Also, is there such a thing as a language-independent algorithm ? Different languages have very different ways of expressing things, and algorithmic course generally teach students about an imperative algorithmic language pretty close to the structure of Pascal and C.

Edited 2011-06-11 11:00 UTC

Reply Parent Score: 1