On 2014-02-05 12:25:48 +0000, "Francesco Cattoglio" <francesco.cattog...@gmail.com> said:

On Wednesday, 5 February 2014 at 12:12:01 UTC, Paulo Pinto wrote:
Yes, the GC just needs to check roots for already released blocks, if I am not mistaken.

Perhaps I lost some explanation in the discussions, but does this improve performance in any way (other than allowing you to disable the GC)?

In general ARC+GC would release memory faster so you need less memory overall. Less garbage memory blocks floating around might make processor caches more efficients. And less memory pressure means the GC itself runs less often, thus less pauses, and shorter pauses since there is less memory to scan.

On the other hand, if you allocate everything you need from the start and then just shuffle pointers around, ARC will make things slower.

So there's some good and some bad. It's hard to know exactly how much of each in practice without an implementation to take some measurements with real world programs. But what's certain is that with ARC the overhead is more evenly distributed in time.

--
Michel Fortin
michel.for...@michelf.ca
http://michelf.ca

Reply via email to