News for hackers. Stuff that matters.
Re:Garbage Collection is Wrong by rian on Thursday February 27, 2014 @05:08PM (#7315532)
I'm a bit skeptical of the results of that paper without the seeing the source code and in what contexts they are performing the comparison. One can always find situations where one scheme is faster than the other but I'm not totally sure if micro benchmarks are representative of the real world. In long-lived servers, ref-counting can be preferable because it avoids random pauses. Maybe it's a latency vs throughput performance dichotomy. But yeah, thanks for posting that.
Re:Garbage Collection is Wrong by danbruc on Thursday February 27, 2014 @05:22PM (#7315652)
Reference counting doubles the number of memory access - you have to update the reference and the counter every time. That is a big performance hit. Reference counting may randomly halt your code, too, because you never know when you hit zero and the resource gets freed.
Re:Garbage Collection is Wrong by mcguire on Thursday February 27, 2014 @07:19PM (#7316385)
And you don't know how many resources will be freed when you drop the last pointer to that giant tree structure.

Of course, you could queue up and lazily delete the resources, but then you're back to nondeterministic behavior.