On Wednesday, 24 May 2017 at 14:26:42 UTC, Wulfklaue wrote:
On Wednesday, 24 May 2017 at 10:34:02 UTC, Moritz Maxeiner
wrote:
Because the garbage collector (GC) allocates a sizable chunk
of memory from the operating system at program startup, from
which it then in turn allocates memory for you when you use
things like dynamic closures, `new XYZ`, etc.
Well, that sounds just silly.
Before making such judgement you may want to consider the cost of
system calls, how memory fragmentation affects a conservative GC,
and why we cannot have a different kind of GC without
unacceptable trade offs.
Yes, it is. It is the price we have to pay for having a GC. If
the overhead bothers you, you might want to compare it with
other garbage collected languages (such as Go).
Go is a different animal because of the concurrent GC.
Not the point.