On Thursday, 13 March 2014 at 13:37:52 UTC, Dicebot wrote:
On Thursday, 13 March 2014 at 13:16:54 UTC, Daniel Murphy wrote:
"Steven Schveighoffer" wrote in message news:op.xcnu55j2eav7ka@stevens-macbook-pro.local...

> The worst breaking change in D2, by far, is the prevention > of array stomping.

What is your use case(s), might I ask? Prevention of array stomping, I thought, had a net positive effect on performance, because it no longer has to lock the GC for thread-local appends.

I would guess they're setting length to zero and appending to re-use the memory.

Exactly. So far looks like upon transition to D2 almost all arrays used in our code will need to be replaced with some variation of Appender!T

From what little I have read about sociomantic's codebase (pre-allocated lumps of memory, stomped all over to keep code simple and prevent needing extra allocations, am I right?), I would imagine you would be better off just emulating the old behaviour in a little wrapper around a builtin array.

Reply via email to