On 12/7/17 6:07 PM, Iain Buclaw wrote:
On 7 December 2017 at 23:39, Daniel Kozak <[email protected]> wrote:
The other slowdown is caused by concatenation. Because std::string += is
more simillar to std.array.(Ref)Appender
Correct. The semantics of ~= mean that the memory is copied around to
a new allocation every time (unless the array is marked
assumeSafeAppend).
Slightly incorrect. If an array is not marked with the append bit (or
not even part of the GC), it is copied on the *first* append. However,
it is copied to a new GC block that DOES have the bit set. Further
appends are amortized.
-Steve