discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: speed of Obj-C vs. C++(slightly OT)


From: Philippe C . D . Robert
Subject: Re: speed of Obj-C vs. C++(slightly OT)
Date: Wed, 23 Apr 2003 21:30:31 +0200

On Wednesday, April 23, 2003, at 06:15 PM, Richard Frith-Macdonald wrote:
On Wednesday, April 23, 2003, at 04:16  pm, Martin Häcker wrote:
You could either use a C-Package for the heavy work, or you could do the backend in C++ and the frontend in Cocoa on OS X.

Though that makes it impossible to port it to GnuStep the advantage would be that you get the best of both worlds (C++ computation/Obj-C fast and maintainable gui building)

Sounds like you are propogating the myth that C++ is faster than ObjC ... Where like is compared with like, that's not the case, and in my experience
ObjC is faster because it's simpler and you can therefore devote more
time to good design and optimisation.

Of course, a good design is much more worth than these performance advantages. But to remain fair, it is as well possible to create good designs in C++, plus ObjC method invocation is slower then C++ function calls, no matter what you do - as is a virtual function call slower than a static one :-) On the other side, if you create a good OO design in C++ then you are often forced to use 'advanced' C++ features (incl. virtual functions) which are not as fast neither.

But IMHO most important is that the part which requires the most tuning will most likely be written in plain C and then 'integrated' in C++ or ObjC code, so I guess the slight performance advantage of the language C++ over the language ObjC does not matter...

-Phil
--
Philippe C.D. Robert
http://www.nice.ch/~phip





reply via email to

[Prev in Thread] Current Thread [Next in Thread]