On Tuesday 08 November 2005 05:23 pm, Jerry Feldman wrote:
On Tuesday 08 November 2005 5:13 pm, Andre Truter wrote:
Yes, that is true, but in the context of this thread it is not a real factor. A person stated that GNOME should be slower than KDE because it is written in C.
Why would an application written in C (GNOME/GTK) be slower than an application written in C++(KDE/QT). In my experience, I have seen applications written in an interpretive language run faster than comparable apps written in C, but assuming that both sets of code are reasonably well written, C++ should be a bit slower because of 2 factors (C++ has more code, and C++ compilers cannot optimize as well as C compilers yet).
On the contrary. Properly written C++ is very lean, and because of certain capabilities of arranging structures that cannot be emulated very effectively in C, C++ can run run faster than C. If you want to see fast C++: http://www.kdevelop.org/HEAD/doc/api/html/classLexer.html http://www.kdevelop.org/HEAD/doc/api/html/classParser.html http://www.kdevelop.org/HEAD/doc/api/html/dir_e510b82d92bcaa4753346dc3a629a6... With additions such as the new move semantics, I suspect C++ will extend it's performance lead. But you have to know how to exploit C++. A lot of people, even people who are considered "experts" don't really understand it. Steven