🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rec.games.programmer
Article #2040

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

#2040
From: Derick J.R. Qua-Gonzalez
Date: Sun, 03 Sep 1995 02:31
29 lines
1795 bytes
akemi@netcom.com (David Boeren) writes:

>Gavin Estey (gavin@senator.demon.co.uk) wrote:

>: Why should you care which one is faster? You don't usually allocate memory
>: in inner loops or speed critical areas. New is better, maybe not faster,
>: but better.

>Well, there's only one problem I can think of.  There is no "renew" analagous
>to the realloc() function.  

What realloc() does is change the size of an allocated block of memory.
The question is, what would it mean to "renew" an object? You cannot 
change an individual object's size. As far as an array of objects is
concerned, if you want a resizable array, it is better to use a container
class specifically designed for this purpose. So what would the semantics
and use of "renew" be?

Best regards,
Derick.

--
+------------------------------------------------------------------------+
| Derick R. Qua-Gonzalez                                      | ________ |
| Department of High Energy Physics, Cal State University     | \      / |
| dqua@dqua.EarthLink.Net                                     |  \    /  |
|     ``It is better to be hated for what one is,             |   \  /   |
|       than loved for what one is not.'' (A. Gide)           | G  \/ USA|
+-------------------------------------------------------------+----------+
Technical Details
Message-ID: <dqua.810095515@dqua>
Path: arc1-ca.pugleaf.net!nntp.earthlink.net!dqua!dqua
References: <809779542snz@onex.demon.co.uk> <809810607snz@senator.demon.co.uk> <akemiDE6nJo.4u@netcom.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!nntp.earthlink.net!dqua!dqua
From: dqua@earthlink.net (Derick J.R. Qua-Gonzalez)
Newsgroups: rec.games.programmer,comp.lang.c++
Subject: Re: cout vs printf speed (was: Should I learn C or C++ first?)
Date: 3 Sep 95 02:31:55 GMT
Organization: Earthlink Network, Inc.
Message-ID: <dqua.810095515@dqua>
References: <809779542snz@onex.demon.co.uk> <809810607snz@senator.demon.co.uk> <akemiDE6nJo.4u@netcom.com>
NNTP-Posting-Host: dqua.earthlink.net