Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Mar 2002 18:35:37 +0100 (MET)
From:      Andy Sporner <sporner@nentec.de>
To:        "M. Warner Losh" <imp@village.org>
Cc:        freebsd-hackers@FreeBSD.ORG, vel@bugz.infotecs.ru, culverk@alpha.yumyumyum.org
Subject:   Re: C vs C++
Message-ID:  <XFMail.020305183537.sporner@nentec.de>
In-Reply-To: <20020305.094927.40858673.imp@village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> C++ doesn't add noticable overhead and isn't slow, unless you are a
> dumbass about how you write it.  All languages give you plenty of ways
> to write speghetti fortran code :-).  C++ gives you a number of ways
> to obfuscate.
> 

I hate to enter such a fray, but I can pass on my experience working with a
group of engineers porting an application.  This was about 6 years ago, so
perhaps they cleared up the semantics of the problem I describe.

We had a revenue management application which ran very well on an HP-9000/G70
(a dual process PA-RISC machine).  We moved it to an 18 processor Sequent 
machine and it dominated the machine.  After investigation we found that the
application code was spending 95% of it's time in Memmove.  After even more
investigation there was an argument of interpretation on semantics.  The HP
compiler passed a pointer as a reference to an object and the Compiler from 
Edinburg was actually copying the object (which was not small by any means).

Such problems would be easy to spot in a regular 'C' program because it would
render a compiler error.  

The point made about having competant experience with C++ is very well noted
and I think the strongest argument.   So put simply, ask the boss if he want's
to add risk to the project because there is perhaps a lack of adequate
experience in C++.  If the boss has his wits about him (???) he should take
the path that would be less risky--DISPITE his own preferences (unless he want's
to pay more for well trained engineers).


Andy

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.020305183537.sporner>