Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Isn it much cheaper to use reference counts rather than garbage collection?

0
10 Posted

Isn it much cheaper to use reference counts rather than garbage collection?

0

No, updating reference counts is quite expensive, and they have a couple of problems: • They can’t cope with cycles; that is, sets of objects that are referred to only by objects in that set, but that don’t have a zero reference count. • Reference counting gets more expensive if you have to allow for the count overflowing. There are many systems that use reference counts, and avoid the problems described above by using a conventional garbage collector to complement it. This is usually done for real-time benefits. Unfortunately, experience shows that this is generally less efficient than implementing a proper real-time garbage collector, except in the case where most reference counts are one. Related terms: reference counting Relevant publications: • David S. Wise. 1993. Stop-and-copy and one-bit reference counting.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123