Boost logo

Boost :

Subject: Re: [boost] [object_pool]too slow?
From: Ben Muzal (bmuzal_at_[hidden])
Date: 2009-03-16 17:25:28


yes, but O(n) n times is O(n^2)

On Mon, Mar 16, 2009 at 4:22 PM, Paul Baxter <pauljbaxter_at_[hidden]> wrote:
>>
>
> Object pool is very slow. destroy() is O(n) where n is the number of
> free objects. Therefore if you allocate N objects and then destroy N
> objects, you end up with a O(N^2) runtime.
> <
> I know nothing about the classes in question, but an O(n) followed by (plus)
> another O(n) operation is still O(n) NOT O(n^2)
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk