← Back to team overview

unity-dev team mailing list archive

Re: [Ayatana-dev] C++ memory allocation

 

On Wed, 2011-09-21 at 11:43 +1200, Tim Penhey wrote:
> We can see that calloc is faster only at small sizes.  What's more, the 
> overhead of using a std::vector decreases rapidly as the size gets 
> larger.

And aren't almost all allocations in most programs smaller in nature.
Especially GUI programs and toolkits.  The only place I could think we'd
even come close to "large" allocations would be in buffer images, and
there shouldn't be too many of those.

I think that the old adage still holds: If you want something done
right, do it yourself.  But often times you're willing to take the
penalty and outsource the work to the standard lib to make life easy in
non-critical sections.  So "use the appropriate technology for the code
in question." ;-)

		--Ted

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References