Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.szaf.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Ian Collins Newsgroups: comp.lang.c++ Subject: Re: Generally, are the programs written by C++ slower than written by C 10% ? Date: Sun, 04 Sep 2011 08:15:41 +1200 Lines: 35 Message-ID: <9cfg7dFsstU2@mid.individual.net> References: <4e61c07d$0$3061$7b1e8fa0@news.nbl.fi> <9ce886FsstU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net aJ4XyNO7DNs6Kc/iwSu3mwHlKO0mpSkgV8AHux8Ol42Y1tqmqp Cancel-Lock: sha1:EWqKVG7I8NYp0D4OPgYc6oqkHVY= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.9) Gecko/20101021 Lightning/1.0b2 Thunderbird/3.1.4 In-Reply-To: Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:9699 On 09/ 4/11 05:49 AM, BGB wrote: > On 9/3/2011 1:53 AM, Ian Collins wrote: >> On 09/ 3/11 08:45 PM, BGB wrote: >>> >>> also, just how many people really use "qsort()" anyways?... >>> IME, it is more often one of those largely forgotten functions (it is >>> there, but more often people write out their own sort logic manually). >>> >>> (actually, it seems to be fairly common practice in C land for people to >>> largely ignore much of the standard library, and to write their own >>> logic for doing things). >> >> That says it all really, C++ programmers don't have to. >> > > it is a choice though, and probably most C programmers don't mind so > much, which is why they do it. Or they are forced to in order to get decent performance. > it is possible it may be as much a stylistic/idiomatic/... conflict as a > language one. > > for example, I use C a lot mostly because I have concerns like: > being able to parse and analyze the source code with custom written tools; > being able to have a reasonably consistent ABI (for all my ASM/... to > interface with); > being able to interface easily between my native code and my scripting > language; > .... That's what C++ has extern "C" for. I've written PHP extensions in C++. -- Ian Collins