Re: is C necessarily faster than C++

kohtala@laurel.trs.ntc.nokia.com (Kohtala Marko)
Sun, 9 Apr 1995 11:48:33 GMT

          From comp.compilers

Related articles
is C necessarily faster than C++ tbrannon@mars.mars.eecs.lehigh.edu (1995-04-03)
Re: is C necessarily faster than C++ rfg@rahul.net (Ronald F. Guilmette) (1995-04-06)
Re: is C necessarily faster than C++ maccer@MT.net (1995-04-06)
Re: is C necessarily faster than C++ dave@edo.ho.att.com (1995-04-16)
Re: is C necessarily faster than C++ t.hulek@imperial.ac.uk (1995-04-18)
Re: is C necessarily faster than C++ A.McEwan@lpac.ac.uk (Alistair McEwan) (1995-04-18)
Re: is C necessarily faster than C++ Marianne.Mueller@Eng.Sun.COM (1995-04-07)
Re: is C necessarily faster than C++ kohtala@laurel.trs.ntc.nokia.com (1995-04-09)
Re: is C necessarily faster than C++ rdo@elt.com (1995-04-10)
Re: is C necessarily faster than C++ tmb@netcom.com (1995-04-20)
Re: is C necessarily faster than C++ ruiter@ruls41.fsw.leidenuniv.nl (1995-04-20)
Re: is C necessarily faster than C++ cliffc@crocus.hpl.hp.com (1995-04-17)
Re: is C necessarily faster than C++ gardner@pink-panther.cs.uiuc.edu (1995-04-28)
Re: is C necessarily faster than C++ urs@engineering.ucsb.edu (1995-04-28)
[14 later articles]
| List of all articles for this month |

Newsgroups: comp.lang.c++,comp.compilers
From: kohtala@laurel.trs.ntc.nokia.com (Kohtala Marko)
Keywords: C++, performance
Organization: Nokia Telecommunications
References: 95-04-044
Date: Sun, 9 Apr 1995 11:48:33 GMT

tbrannon@mars.mars.eecs.lehigh.edu (tbrannon) writes:


> This guy in my lab keeps refusing to use C++ in our program intended
> to simulate somatosensory neural circuits because he says it is slower
> than C. My (uninformed) response was that most of what you see as
> overhead (ie, message routing, value accessing, type checking) is
> optimized away at compile-time.


You should be reading some C++ newsgroup. They discuss this thing a
lot.


In short: No. You can write the same things very much the same in C++
and C (mostly even in same syntax). If there is any difference, it is
just the general thing of differences in the compilers -- it is not
caused by the language.


Of course, if you write things differently, they might work
differently and might have different efficiency. It is up to you how
you write them. C++ supports some ways that you might choose to use in
C too, even without knowing anything about C++. With C++ compiler it
just is much easier. Might be faster too.


There is no message routing. Just means to make functions that deal
with some structures (or "class"es, if you want to make the
distinction). The functions are called methods sometimes, member
functions most often to avoid the confusion.


I suggest you do not jump into using C++ features before you
understand what you want to do and how/if C++ makes it for you. I
think you are more into the problem domain than computer science. What
little I have learnt suggests that problem domain people can perform
quite well if they can concentrate in the problem domain, but produce
terribly bad results if distracted by fashionable things from computer
science. There is so much in computer science and so little you can
benefit from. Better have some computer science person find what you
need for you.
--
---
Marko Kohtala - Marko.Kohtala@ntc.nokia.com, Marko.Kohtala@hut.fi
--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.