On Friday, 8 December 2017 at 15:40:08 UTC, Steven Schveighoffer wrote:
On 12/7/17 8:11 PM, Mengu wrote:
On Thursday, 7 December 2017 at 22:39:44 UTC, Daniel Kozak wrote:
The other slowdown is caused by concatenation. Because std::string += is more simillar to std.array.(Ref)Appender

wait, i thought appenders performed better than concatenation. is that not true or did i just misunderstand your post?


You misunderstood. Appender is faster than ~= to a straight array, because it doesn't have to do any opaque lookups in the GC to see if it needs to reallocate -- all the information is right there.

Daniel's point was that Appender is more akin to std::string (which doesn't have the benefit of having language-defined array operaions). If the blogger used Appender, he would have had better performance.

-Steve

thanks for the explanation steve.

Reply via email to