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 476970
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[6]: GCC isn't all that great
by Alfman on Sat 11th Jun 2011 17:30 UTC in reply to "RE[5]: GCC isn't all that great"
Alfman
Member since:
2011-01-28

acobar,

"Perhaps, I should have said it on a more direct style: I do not encourage people to write optimized code, I tell them to look for good algorithms and rather to good libraries whenever they are available."

I'm not sure what this has to do with my original post, but we seem to be on the same track.

"To me, actually, all this talk about the better language to code in is a bit misleading, we should clearly concentrate on algorithms."

Ditto.

"Sincerely, for most of the applications it does not matter a dime if you spend 1 millisecond or 1 microsecond doing something, and there are a factor of 1000 involved."

Well I actually disagree here, but that's just me.

"And for the ones that matter, there are a chance that it is already well known and that a wise compromise was devised."

Yes, by far and large, it is very difficult to write truly original algorithms because it's extremely likely thousands of other developers have tried to solve the same problems before us. However just because someone else has already done it dosn't strictly mean that we need to copy and paste every single line of code either.

"I see people everyday praising languages that make them write less code...And all those arguments are sensible."

Yes they are.

Reply Parent Score: 2

acobar Member since:
2005-11-15

I guess I read too much on your arguments on:

I actually don't encourage people to optimize things at such small levels or in assembly. I'm just disturbed that so many people are under the false impression that their compilers are so difficult to beat.


I understand that what you gave was just a very simple example about code optimization and the common sense idea people have about compilers outsmart our flesh brains, what we both see as unconnected to reality. But we should not forget that they are coded by biological primates, though possibly very smart ones and build through on hours orders of magnitude greater than the time we have available to complete our work, they are still creations of human brains and, as such, will always have space to a little helping hand.

Anyway, I was just trying to emphasize a very common fault on our education on CS. People feel a push toward optimizing but, at same time lacks a proper knowledge about algorithms, computer architecture and code generation and how they are linked. Because of that, they frequently write subpar code that they should not. That is why I vehemently push them towards libraries.

Reply Parent Score: 2

Alfman Member since:
2011-01-28

acobar,


"Anyway, I was just trying to emphasize a very common fault on our education on CS. People feel a push toward optimizing but, at same time lacks a proper knowledge about algorithms"

You really think CS people feel a push towards optimizing? I've tried promoting my talent for optimizing algorithms and there's been zero interest in it from employers or clients.


As such, I end up loosing the argument that optimization is important on the grounds that if it were important, then employers would be willing to pay for it.


"they frequently write subpar code that they should not. That is why I vehemently push them towards libraries."

That sounds like generally good advice. The quality of libraries isn't always top notch though.

For an example, programmers are better off writing their own arbitrary precision math code than relying on Java's own classes (is this still true today?)

http://people.cis.ksu.edu/~rhowell/calculator/comparison.html

I know what you are saying though. I'd say it depends.

I think code clarity is more important than performance most of the time.

Reply Parent Score: 2