🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #2045

Re: cout vs printf speed (was: Should I learn C or C++ first?)

#2045
From: 21st century caffeine boy
Date: Wed, 06 Sep 1995 03:34
14 lines
1322 bytes
Martin Randall <Martin@onex.demon.co.uk> wrote:

>OK, here's a new one to throw into this thread - but not totally un-related.
>Which is faster new or malloc ? My C++ book says that new should be faster.
>-- 
>Martin Randall
>Software Asylum Ltd.

Depending on the implementation, new will usually do a malloc after a
whole heap of other things that the object you're creating requires.

But that's not the point is it? If you malloc some memory you normally
have to do _something_ with it. Constructors and destructors are nice
ways of handling these things.
Technical Details
Message-ID: <DEG6Jr.JHJ@news.zippo.com>
Path: arc1-ca.pugleaf.net!news3.noc.netcom.net!zdc!zippo!usenet
References: <DDJ2Lp.3DG@pentagon-ai.army.mil> <41afe9$d10@newsbf02.news.aol.com> <41kici$p4t@deyke3.fc.hp.com> <41ngln$qau@druid.borland.com> <41tjep$2hn@deyke3.fc.hp.com> <41v8k9$jq8@tpd.dsccc.com> <41vst0$9nb@gap.cco.caltech.edu> <tgooding-3008950016040001@helser196.res.iastate.edu> <809779542snz@onex.demon.co.uk>

Show Full Headers
Complete Article Headers
Newsgroups: rec.games.programmer,comp.lang.c++
Path: arc1-ca.pugleaf.net!news3.noc.netcom.net!zdc!zippo!usenet
From: garyl@byc.easynet.co.uk (21st century caffeine boy)
Subject: Re: cout vs printf speed (was: Should I learn C or C++ first?)
X-Newsreader: Forte Free Agent 1.0.82
Sender: usenet@news.zippo.com
Nntp-Posting-Host: 194.129.18.14
Organization: Zippo
Message-ID: <DEG6Jr.JHJ@news.zippo.com>
References: <DDJ2Lp.3DG@pentagon-ai.army.mil> <41afe9$d10@newsbf02.news.aol.com> <41kici$p4t@deyke3.fc.hp.com> <41ngln$qau@druid.borland.com> <41tjep$2hn@deyke3.fc.hp.com> <41v8k9$jq8@tpd.dsccc.com> <41vst0$9nb@gap.cco.caltech.edu> <tgooding-3008950016040001@helser196.res.iastate.edu> <809779542snz@onex.demon.co.uk>
Date: Wed, 6 Sep 1995 03:34:22 GMT