The REALLY bad thing about Python lists ..

Courageous jkraska1 at san.rr.com
Tue May 16 21:39:23 EDT 2000


> I note that C++ does allow pre-allocation, but not access to the
> rescale value.

I think that's because it's been proven somewhere that
doubling the size of the vector is what you want to do
or some such (a coworker of mine recently mentioned some
formulas which show that vector append truly is O(1)
amortized time for advance allocate vectors that have
this behavior). Didn't quite know what he was referring
to, though.



C/



More information about the Python-list mailing list