Johannes Pfau:

Here's some example output for
std.uuid/digest/path/range/algorithm/curl:
http://dpaste.dzfl.pl/96d3725b06e2

./dmd -vgc ~/Dokumente/d/phobos/std/range.d -c -unittest
/home/jpf/Dokumente/d/phobos/std/range.d(7307): vgc: Array literals cause gc allocation

Since some time in some cases dynamic array literals don't allocate.

And there's also this:
https://github.com/D-Programming-Language/dmd/pull/2952
the [1, 2]s syntax guarantees no heap allocation.

Bye,
bearophile

Reply via email to