Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #11570
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!newsfeed.utanet.at!newscore.univie.ac.at!newsfeed01.chello.at!newsfeed02.chello.at!news.hispeed.ch.POSTED!not-for-mail |
|---|---|
| Content-Type | text/plain; charset=iso-8859-15; format=flowed; delsp=yes |
| Newsgroups | comp.lang.c++ |
| Subject | Re: STL vector |
| References | <op.v4z6q8m5vc68pg@hp2011.workgroup> <ZvadnW6_dOYbX17TnZ2dnUVZ8nmdnZ2d@giganews.com> |
| Date | Thu, 17 Nov 2011 16:45:07 +0100 |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 7bit |
| From | "Peter Liedermann" <peter09876@hispeed.ch> |
| Message-ID | <op.v43kphuxvc68pg@hp2011.workgroup> (permalink) |
| User-Agent | Opera Mail/11.52 (Win32) |
| X-Complaints-To | abuse@hispeed.ch |
| Organization | hispeed.ch |
| Lines | 26 |
| NNTP-Posting-Host | 80.219.145.247 (80.219.145.247) |
| NNTP-Posting-Date | Thu, 17 Nov 2011 16:47:10 +0100 |
| X-Trace | ef77a4ec52c7ef57e345230680 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c++:11570 |
Show key headers only | View raw
On Wed, 16 Nov 2011 15:02:44 +0100, Leigh Johnston <leigh@i42.co.uk> wrote: > On 15/11/2011 19:50, Peter Liedermann wrote: > If you are going to allocate the Jumbo objects separately for use in > vector<Jumbo*> then you might as well just use std::set<Jumbo>; std::set > will keep the items sorted. > Thank you for the suggestion. However, I am not going to use set because I occasionally have to re-sort. In my case, this resort would be quite intense, that is, almost everything is repositioned each time. This is definitely not a hot spot in the algorithm, but I do not want to swear that it occurs at most so and so often. For this reason, I want to avoid tree-like structures, which an STL set essentially is. But BTW, this takes us back to a variation the original question: Would you, given the use of a set, really use std::set<Jumbo> or std::set<Jumbo *> instead and does it make a difference (that is, does replacing "vector" by "set" in the original question make a difference) Regards. Peter
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
STL vector "Peter Liedermann" <peter09876@hispeed.ch> - 2011-11-15 20:50 +0100
Re: STL vector Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-11-15 21:30 +0100
Re: STL vector Leigh Johnston <leigh@i42.co.uk> - 2011-11-15 21:13 +0000
Re: STL vector Marcel Müller <news.5.maazl@spamgourmet.com> - 2011-11-15 22:46 +0100
Re: STL vector Leigh Johnston <leigh@i42.co.uk> - 2011-11-15 22:02 +0000
Re: STL vector / Heap fragmentation "Peter Liedermann" <peter09876@hispeed.ch> - 2011-11-16 09:02 +0100
Re: STL vector / Heap fragmentation Goran <goran.pusic@gmail.com> - 2011-11-16 00:39 -0800
Re: STL vector / Heap fragmentation "Peter Liedermann" <peter09876@hispeed.ch> - 2011-11-16 10:58 +0100
Re: STL vector / Heap fragmentation Goran <goran.pusic@gmail.com> - 2011-11-16 04:12 -0800
Re: STL vector "Peter Liedermann" <peter09876@hispeed.ch> - 2011-11-16 08:55 +0100
Re: STL vector yatremblay@bel1lin202.(none) (Yannick Tremblay) - 2011-11-16 16:54 +0000
Re: STL vector Joe Gottman <josephgottman@comcast.net> - 2011-11-16 18:22 -0500
Re: STL vector Joe Gottman <josephgottman@comcast.net> - 2011-11-15 21:59 -0500
Re: STL vector "Peter Liedermann" <peter09876@hispeed.ch> - 2011-11-16 08:58 +0100
Re: STL vector Werner <werasm@gmail.com> - 2011-11-16 05:53 -0800
Re: STL vector Leigh Johnston <leigh@i42.co.uk> - 2011-11-16 14:02 +0000
Re: STL vector Leigh Johnston <leigh@i42.co.uk> - 2011-11-16 14:05 +0000
Re: STL vector "Peter Liedermann" <peter09876@hispeed.ch> - 2011-11-17 16:45 +0100
Re: STL vector Leigh Johnston <leigh@i42.co.uk> - 2011-11-17 16:19 +0000
Re: STL vector Joshua Maurice <joshuamaurice@gmail.com> - 2011-11-17 15:19 -0800
csiph-web