Array Operations: a[] + b[] etc.
John Colvin
john.loughran.colvin at gmail.com
Wed Nov 21 10:41:19 PST 2012
On Wednesday, 21 November 2012 at 18:38:59 UTC, Andrei
Alexandrescu wrote:
> On 11/21/12 1:20 PM, John Colvin wrote:
>> On Wednesday, 21 November 2012 at 18:15:51 UTC, Walter Bright
>> wrote:
>>> On 11/21/2012 10:02 AM, John Colvin wrote:
>>>> My vision of how things could work:
>>>> c = a[] opBinary b[];
>>>> should be legal. It should create a new array that is then
>>>> reference
>>>> assigned to c.
>>>
>>> This is not done because it puts excessive pressure on the
>>> garbage
>>> collector. Array ops do not allocate memory by design.
>>
>> Fair enough. When you say excessive pressure, is that
>> performance
>> pressure or design pressure?
>
> Performance pressure - the design here is rather easy if
> efficiency is not a concern.
>
> Andrei
In what way does it become a performance problem? Apologies for
the naive questions, I have nothing more than a passing
understanding of how garbage collection works.
More information about the Digitalmars-d
mailing list