Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!border3.nntp.ams.giganews.com!Xl.tags.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!local2.nntp.ams.giganews.com!nntp.brightview.co.uk!news.brightview.co.uk.POSTED!not-for-mail NNTP-Posting-Date: Wed, 08 Feb 2012 11:51:56 -0600 From: Gareth Owen Newsgroups: comp.lang.c++ Subject: Re: Question about destructors References: <2115496.607.1328686761742.JavaMail.geo-discussion-forums@proa7> <9petprFlo4U4@mid.individual.net> Date: Wed, 08 Feb 2012 17:51:56 +0000 Message-ID: <87ehu5ciwz.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:ZUqkfBZbV22fcype8n6v5AoNA2Y= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 14 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-Vu8GtnaqIet02GbFTY6+/5ZQMa8D5q88IUdGDm4UPPkfIdOSTxjue6j49lzuSLc5+QRU4rvCh+X4k1/!+AdaPFoY1Ne023XBn3yyvtrgcsIQb/QMmKbyyrDo6wcV1fJQyAT1mBVAr5DNjEpn8TM= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1887 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:13856 Ian Collins writes: > On 02/ 8/12 08:39 PM, 88888 Dihedral wrote: >> But for digital images and videos of tens of millions of pixels to be >> processed the C++ vector adds overheads, too. > > No more than naked dynamic arrays. Well, possibly a little bit more (default initialisation, storing the length, and possibly some address calculation if you want to address it as if it were multidimensional, in zigzag fashion, say. Nothing you couldn't fix with a templated custom class, though.) And if those are the speed determining step of your algorithm, you're doing it wrong.