Array Operations: a[] + b[] etc.

Walter Bright newshound2 at digitalmars.com
Wed Nov 21 12:16:59 PST 2012


On 11/21/2012 10:41 AM, John Colvin wrote:
> In what way does it become a performance problem?

Allocating memory is always much, much slower than not allocating memory.

A design that forces allocating new memory and discarding the old as opposed to 
reusing existing already allocated memory is going to be far slower. In fact, 
the allocation/deallocation is going to dominate the performance timings, not 
the array operation itself.

Generally, people who use array operations want them to be really fast.



More information about the Digitalmars-d mailing list