|
Re: The Lazy Builder’s Complexity Lesson
|
Posted: Oct 11, 2006 12:33 AM
|
|
> I am confused. The article says: > > we wouldn’t be using C++ if we didn’t care about > performance. >
What I meant was that for many jobs I prefer to use a high-level language; but in situations where processor cycles -- and other low-level resources -- need careful monitoring, then C++ is an excellent choice.
> But then there are many who insist that other languages > (Java, Haskell, Eiffel etc) are on par with C++. > > So what gives? is C++ better performance-wise or not?
On paper, for example, an NlogN algorithm in Python will always beat an N^2 algorithm in C++, as N gets large. All things being equal, though, C++ will get more from the machine.
I'm not sure if C++ is best placed to exploit multi-processor architectures though. > My opinion is that C++ is better performance-wise, > provided that you know what you are doing.
Agreed.
|
|