Re: is C necessarily faster than C++

rdo@elt.com (Randy Oxentenko)
Mon, 10 Apr 1995 03:22:00 GMT

          From comp.compilers

Related articles
[2 earlier articles]
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)
Re: is C necessarily faster than C++ quanstro@hp-demo1.minerva.bah.com (1995-04-28)
[13 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: rdo@elt.com (Randy Oxentenko)
Keywords: C, C++, performance
Organization: Electronic Label Technology, Broken Arrow, OK
References: 95-04-044
Date: Mon, 10 Apr 1995 03:22:00 GMT

Terrence Brannon <tbrannon@mars.mars.eecs.lehigh.edu> wrote:
>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.
>
>Any pointers to more empirical studies?


It's not exactly an empirical study, but the book recently published by
Stroustrup, _The Design and Evolution of C++_, makes this comment many
times throughout the book: One of the fundamental design concepts for
C++ was this: You don't pay for what you don't use. In other words, the
goal of C++ designers was that it be just as efficient as C in the areas
where the two languages overlap, and every new feature added to the
language was screened against this criteria. The C++ specific features
were also done in the light of efficiency. Nothing that could not be
implemented efficiently from a run-time point of view was seriously
considered for the language. This continues to be an important test for
new language extensions even now. Anyway, this book sheds good light on
the topic of efficiency.
--
Randy Oxentenko
Email: rdo@elt.com
Web: http://dfw.net/~rox/
--


Post a followup to this message

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