|
Re: The Positive Legacy of C++ and Java
|
Posted: Mar 20, 2009 10:01 AM
|
|
> Stroustrup's main goal was > performance. Objective-C dynamic dispatch method call will > never be as fast as a C++ non-virtual/virtual method call.
It can be as fast as non-virtual method calling if you use imp caching on time critical portions. This, of course, unnatural and somewhat inconvenient, rather like giving up polymorphism in an alleged OO language for performance reasons.
More about optimizing objective c: http://www.mulle-kybernetik.com/artikel/Optimization/opti-3-imp-deluxe.html
> The run-time environment of C++ and many of the choices > make perfect sense from a performance point of view.
I disagree with this. 99% of written code is not time critical and does not need maximum performance. If this were not true, Java, Ruby, Python, etc would be stillborn. As long as there is a means of expending a little extra effort on bottlenecks to get closer to hardware and thus faster code, any language can be used for any real time application.
C++'s problem is it thinks 99% of the time everything must be maximally performant and that just isn't true. Wrong tradeoff.
|
|