On 2012-08-28 22:58, Simon Large wrote:
> On 28 August 2012 21:53, Oto BREZINA <otik_at_printflow.eu> wrote:
>> On 2012-08-28 21:26, Stefan Küng wrote:
>>
>>
>>
>> have you tried calling reserve() on an std:vector first to avoid the
>> constant reallocation when loading big files? If not, then please do so
>> and check the timings again.
>>
>> Nor ListOfObject have that info, but I'll try. "my" class starts at 256 and
>> double on next need, but that should not make that big difference.
>> If only reserve makes that difference Add method can be extended by better
>> expand algo.
> I think Stefan wants you to try using std:vector with reserve instead
> of using your own class, not adding reserve to your class.
I get that ....
I was trying to say, that vector - the class we derive from it
(CFileTextLines namely) can be patched in Add method with same algo for
expansion as my class do if that will make vector based solution comparable.
But what I have see they use double expand already - or it was +1/2 ?
Neverming I'll try that a post results.
> Simon
>
--
Oto ot(ik) BREZINA - 오토
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=3001720
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2012-08-28 23:03:57 CEST