Quite true. It is probably easier to design a faster procedural program, but your right that it is quite possible to write a well written and fast object-oriented program.Originally posted by thefroggy
> Procedural C is generally much faster than OO C++.
This is usually true. But it also usually has to do more with design than the language itself. The problem with OO C++ is that people get used to the "ease" of objects and start passing the things around by value. If you're constantly invoking copy constructors and making multiple temporaries with every function call, it's going to 1) quickly fragment your heap (if your object has dynamically allocated members), and 2) destroy any chance of cache hits.
Just as there is an art to coding efficient C, there is an art to coding efficient C++. C programmers have just had longer to refine it.
Silvercord... Of course object-oriented programs/libraries are not always that great. A lot of it has to do with the design. It is just as possible to poorly design a procedural program/library as it is an object-oriented one. The initial design may be a bit easier with procedural, and there may be fewer design considerations, but that says nothing against OO design.
Zakk, I think Ken may have been referring to a comment that I made.