🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #2051

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

#2051
From: Geoffrey Rubin
Date: Thu, 07 Sep 1995 12:08
16 lines
1533 bytes
In article <42kq70$8vu@martha.utcc.utk.edu>, mbk@caffeine.engr.utk.edu says...
>
>Eric Gunnerson (ericgu@microsoft.com) wrote:
>
>
>I.e. I don't understand the motivation for allowing tweaking with "new"
>when you could do it with normal routines, it seems like needless complexity.

The main advantage of using class specific news is the prevention of heap
fragmentation. SInce presummably all objects of the same class are the same
size, allocation/deallocation of these items from there own heap prevents
heap fragmentation. The create function you mentioned, would not do this
without much needed complication to maintain separate heaps for each size
allocation...

Geoffrey
Technical Details
Message-ID: <42mnbt$psi@mksrv1.dseg.ti.com>
Path: arc1-ca.pugleaf.net!news.dseg.ti.com!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> <425akd$4r7@status.gen.nz> <42ibl0$kfq@news2100.microsoft.com> <42kq70$8vu@martha.utcc.utk.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.dseg.ti.com!usenet
From: grubin@ti.com (Geoffrey Rubin)
Newsgroups: rec.games.programmer,comp.lang.c++
Subject: Re: cout vs printf speed (was: Should I learn C or C++ first?)
Date: 7 Sep 1995 12:08:29 GMT
Organization: AWP
Message-ID: <42mnbt$psi@mksrv1.dseg.ti.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> <425akd$4r7@status.gen.nz> <42ibl0$kfq@news2100.microsoft.com> <42kq70$8vu@martha.utcc.utk.edu>
NNTP-Posting-Host: cna0185662.dseg.ti.com
Mime-Version: 1.0
Content-Type: Text/Plain; charset=ISO-8859-1
X-Newsreader: WinVN 0.99.5