On Tuesday, 11 February 2014 at 14:32:10 UTC, Jakob Ovrum wrote:
D code has different allocation patterns from Java and C#. In idiomatic D, young GC-allocated objects are probably much fewer.
From Java - most probably. From C# - less so, because C# also has value types living on stack. In all of them little temporary strings and arrays are often main garbage generators, and most of them die young. Just think how many temporary arrays are allocated and become garbage while you grow a single array variable with "a ~= x;" in a loop. And before you say "Appender" think of associative arrays too.
In case of D it's also problematic to decide which allocation pattern is idiomatic for it, since D can be used so differently in different applications.
