
16 Mar
2009
16 Mar
'09
8:22 p.m.
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)