List:MySQL++« Previous MessageNext Message »
From:Tomalak Geret'kal Date:March 23 2011 12:09pm
Subject:Re: StoreQueryResults destructor runs without end...
View as plain text  
On 23/03/2011 11:59, Warren Young wrote:
> On 3/23/2011 4:07 AM, Tomalak Geret'kal wrote:
>>
>> It's not necessarily strictly doubled.
>
> Name an implementation of std::vector that doesn't do this.

I'm in the process of attempting to compile a list of 
multipliers across toolchains. I'll post it when it's done 
if you're interested.

Still, though, it's besides the point. That the multiplier 
is not standardised means that on any toolchain it could 
change at any time. It doesn't really matter whether all 
your favourite implementations currently use a doubling-up 
technique if they could legally stop doing that at any time.

>
>> I don't see why you'd ever reserve *more* than the number
>> of records
>
> In this case, you'd do that to avoid the need for a separate
> COUNT(*) query. If you have a pretty good idea already how
> many records to expect, reserving that amount plus some
> small fudge factor will probably run faster than doing two
> queries so you can reserve only exactly what is required.

Sure, if you don't know what the number of entries will be, 
that makes sense.

The phrasing "the number of records possible from the query" 
implied to me that no higher number would be possible, and 
reserving more space than is possible to fill is the "waste 
of space" I was talking about.

Tom
Thread
StoreQueryResults destructor runs without end...Paul Dalach22 Mar
Re: StoreQueryResults destructor runs without end...Dino Korah22 Mar
  • Re: StoreQueryResults destructor runs without end...Paul Dalach23 Mar
    • Re: StoreQueryResults destructor runs without end...Warren Young23 Mar
      • Re: StoreQueryResults destructor runs without end...Warren Young23 Mar
        • Re: StoreQueryResults destructor runs without end...Tomalak Geret'kal23 Mar
          • Re: StoreQueryResults destructor runs without end...Mickael Wolff23 Mar
            • Re: StoreQueryResults destructor runs without end...Tomalak Geret'kal23 Mar
              • Re: StoreQueryResults destructor runs without end...Mickael Wolff23 Mar
                • Re: StoreQueryResults destructor runs without end...Tomalak Geret'kal23 Mar
          • Re: StoreQueryResults destructor runs without end...Warren Young23 Mar
            • Re: StoreQueryResults destructor runs without end...Tomalak Geret'kal23 Mar
              • List etiquette - please use good email subjects :)Joel Fielder23 Mar
                • Re: List etiquette - please use good email subjects :)Tomalak Geret'kal23 Mar
                  • Re: List etiquette - please use good email subjects :)Paul Dalach23 Mar
                    • Re: List etiquette - please use good email subjects :)Dino Korah23 Mar
                      • Re: StoreQueryResults destructor runs without end...Paul Dalach23 Mar
                      • Re: StoreQueryResults destructor runs without end...F.N. Bruggeman23 Mar
                    • Re: List etiquette - please use good email subjects :)Joel Fielder23 Mar
              • Re: growth behavior of std::vectorWarren Young23 Mar
                • Re: growth behavior of std::vectorTomalak Geret'kal23 Mar
                  • Re: growth behavior of std::vectorJonathan Wakely23 Mar
                    • Re: (OT) growth behavior of std::vectorTomalak Geret'kal23 Mar
                      • Re: (OT) growth behavior of std::vectorJonathan Wakely23 Mar
                • Re: (OT) growth behavior of std::vectorTomalak Geret'kal23 Mar
            • Re: StoreQueryResults destructor runs without end...Tomalak Geret'kal23 Mar
              • re: (OT) growth behaviour of std::vector [was Re: StoreQueryResultsdestructor runs without end...]Tomalak Geret'kal23 Mar
        • Re: StoreQueryResults destructor runs without end...Warren Young23 Mar
Re: StoreQueryResults destructor runs without end...Dino Korah23 Mar