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) |
[17 later articles] |
Newsgroups: | comp.compilers |
From: | t.hulek@imperial.ac.uk (Mr Tomas Hulek) |
Keywords: | C, C++, performance |
Organization: | Imperial College of Science, Technology and Medicine, London |
References: | 95-04-044 |
Date: | Tue, 18 Apr 1995 05:05:47 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.
I have the following experience:
If I have a program that is both valid C and C++, a C++ compiler generates
faster code then C (tested on IBM xlC, CC on DEC/Alpha). My explanation is
that because of stricter type checking, the compiler can use more aggressive
assumptions concerning aliasing.
--
Tomas Hulek --------------------------------------------------t.hulek@ic.ac.uk
Mechanical Engineering Dept.
Imperial College
London SW7 2BX tel. (+44 171) 589 5111 x 57112
--
Return to the
comp.compilers page.
Search the
comp.compilers archives again.