[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Input::operator=, == and copy ctor

From: Václav Slavík
Subject: Re: [lmi] Input::operator=, == and copy ctor
Date: Tue, 26 Jun 2012 18:29:33 +0200

On 22 Jun 2012, at 22:55, Greg Chicares wrote:
>> The other Input copy ctor performance problem is DoAdaptExternalities(),
>> it recreates the (same) database on each copy. If I remove this call,
>> the reserve()-less version takes only some 115% of the better version's
>> time (compared to 170% originally).
>> This could, I think, be easily fixed by using shared_ptr for the
>> database and not doing any real work in copy ctor. Should I do it?
> I suspect that will be handled by the patches you posted 2012-06-15.

It should be much improved by them, although some inefficiency remains: a new 
product_database instance is still created every time in DoAdaptExternalities().


reply via email to

[Prev in Thread] Current Thread [Next in Thread]