api arrays pre-allocated for expansion ? 2003-11-26 - By Berj Bannayan
Back On November 27, 2003 07:51 am, you wrote: > Hi list people, > > Does anyone happen to know if the M*Array classes pre-allocate > themselves to a larger size to make expansion with M*Array::append(...) > more efficient? I don't see mention of this in the docs. Yes, they do pre-allocate, though not in a very smart way.
See the setSizeIncrement() and sizeIncrement() method docs. Essentially they pre-allocate a constant amount for each insertion (if there isn't enough room). I usually prefer some sort of exponential pre-allocation but it's better than nothing.
Berj
-- "A cigar is a banana for the monkey of the soul" -- Switters Berj Bannayan - soho vfx - berj@(protected) - 416-591-1400
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- --- List-help: <mailto:listar@(protected)?Subject=help> List-archive: <http://www.highend3d.com/maya/devarchive/>
|
|