GCs in the news
Russel Winder via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 17 11:44:30 PDT 2014
On Thu, 2014-07-17 at 15:11 -0300, Ary Borenszweig via Digitalmars-d
wrote:
[…]
> Java is everywhere and it has a GC. Go is starting to be everywhere and
> it has a GC. C# too has a GC, and I think they use it to make games too.
> I don't think everyone hates GCs. :-)
I think we need to try and turn this to a more constructive debate and
the above gives a hook.
The Go thread is coming to the conclusion that they need a better GC
than they currently have. I suspect this will now become a unit of work
and that something good will come of it.
For many years GC in Java has been a bit of a problem; Java relies on
GC, yet the algorithms were always a bit of a compromise and second
rate. However Java now has the G1 garbage collector and there is
evidence and a huge amount of hope that this is actually a turning
point.
Java exhibits the behaviour of having a lot of very short lived objects
so it becomes crucial to be able to deal with object creation as a very
lightweight activity and for very lightweight collection of rapidly
useless objects. Java originally went for a generational GC strategy but
this has always led to problems especially in a multicore context.
Taking an alternative strategy, G1 has seemingly ameliorated a lot of
the problems leading to a system that is not "stop the world", is
multicore and multithread compatible, and works very well such that soft
real time is seemingly not a problem.
I have no data re C#.
With C++ I am coming to grips with RAII management of the heap. With
Java, Groovy, Go and Python I rely on the GC doing a good job. I note
though that there is a lot of evidence that the Unreal folk developed a
garbage collector for C++ exactly because they didn't want to do the
RAII thing.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20140717/89384394/attachment.sig>
More information about the Digitalmars-d
mailing list