Re: is C necessarily faster than C++

"Ronald F. Guilmette" <rfg@rahul.net>
Thu, 6 Apr 1995 11:10:32 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)
[20 later articles]
| List of all articles for this month |

Newsgroups: comp.compilers
From: "Ronald F. Guilmette" <rfg@rahul.net>
Keywords: C, C++, performance
Organization: a2i network
References: 95-04-044
Date: Thu, 6 Apr 1995 11:10:32 GMT

tbrannon <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?


The one that I happen to be familiar with is:


"A C++ Interpreter for Scheme"
Vincent F. Russo & Simon M. Kaplan
1988 USENIX C++ Conference Proceedings
Denver, Colorado
October 17-21, 1988
pp. 95-108


OK. I _know_ that doesn't _sound_ like what you had in mind, but read it.
It is an experience report on converting a particular large program (i.e.
a Scheme interpreter) from C to C++, along with before & after performance
measurements. The conclusion was that if you write good C++ code, it can
be _faster_ than the (roughly) equivalent C code.


{Please don't take that as a personal recommendation to use C++. It isn't
for everybody.}


--


-- Ron Guilmette, Sunnyvale, CA ---------- RG Consulting -------------------
---- E-mail: rfg@segfault.us.com ----------- Purveyors of Compiler Test ----
-------------------------------------------- Suites and Bullet-Proof Shoes -
--


Post a followup to this message

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