Re:Is reference counting slower than GC?
by rubber_duck on Tuesday May 24, 2016 @06:17AM
(#11760217)
I'm not sure about the others but the D model is probably the worst of both worlds - you can transparently store a GC allocated reference in to unmanaged heap and risk having dangling pointers after a random collection or you have to root everything you allocate increasing the scan.
Something like Rust has a type system powerful enough to track such things so if you added GC to Rust you could deal with it sanely.
D suffers from not having a good GC implementation in first place.
There is someone improving it with this year during a GSoC project.
Re:Is reference counting slower than GC?
by rubber_duck on Tuesday May 24, 2016 @09:16AM
(#11761254)
This is true as well but at least that part is fixable (although I'm not sure it's in the realm of a GSoC project considering the kind of work that went in to stuff like various JVM GC implementations)
They are mainly making it precise as stepping stone for further improvements.
https://summerofcode.withgoogle.com/projects/#62055978295623...
In Modula-3, I can either fully rely on the GC, do safe global and stack allocations, or if really needed make use of manual memory management in unsafe modules.
So it is not as all allocations need to be on the GC heap, in GC enabled languages.