From owner-freebsd-hackers Tue Mar 5 9:36: 8 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from gate.nentec.de (gate2.nentec.de [194.25.215.66]) by hub.freebsd.org (Postfix) with ESMTP id CA4DC37B400 for ; Tue, 5 Mar 2002 09:35:57 -0800 (PST) Received: from nenny.nentec.de (root@nenny.nentec.de [153.92.64.1]) by gate.nentec.de (8.9.3/8.9.3) with ESMTP id SAA13641; Tue, 5 Mar 2002 18:35:40 +0100 Received: from andromeda (andromeda [153.92.64.34]) by nenny.nentec.de (8.11.3/8.11.3/SuSE Linux 8.11.1-0.5) with ESMTP id g25HZYh20898; Tue, 5 Mar 2002 18:35:34 +0100 Message-ID: X-Mailer: XFMail 1.4.0 on Linux X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20020305.094927.40858673.imp@village.org> Date: Tue, 05 Mar 2002 18:35:37 +0100 (MET) Reply-To: Andy Sporner Organization: NENTEC Netywerktechnologie GmbH From: Andy Sporner To: "M. Warner Losh" Subject: Re: C vs C++ Cc: freebsd-hackers@FreeBSD.ORG, vel@bugz.infotecs.ru, culverk@alpha.yumyumyum.org X-Virus-Scanned: by AMaViS-perl11-milter (http://amavis.org/) Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > 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