Re: [rust-dev] Three level memory system

2011-05-16 Thread Graydon Hoare
On 16/05/2011 11:59 AM, Tim Chevalier wrote: There's only one thing I've noticed about RC (never having worked with a system that used it before): it seems to be a source of compiler bugs. Just in writing code that seems to be a bit more functional and deeply-nested than some of the existing cod

Re: [rust-dev] Three level memory system

2011-05-16 Thread Tim Chevalier
On Mon, May 16, 2011 at 11:49 AM, Graydon Hoare wrote: > I've really not seen any single answer for the "best" storage management > system; automatic or manual. Apologies if it sounds like I'm proposing RC as > that champion. It's surely got flaws (code footprint, cache write traffic > and acyclic

Re: [rust-dev] Three level memory system

2011-05-16 Thread Graydon Hoare
On 16/05/2011 10:40 AM, Tim Chevalier wrote: Ah. I wasn't claiming anything about the relationship about GC and ref-counting. But I found Graydon's assertion that "GC trashes the whole cache regularly" to be rather strong, as there are many kinds of GC, not just copying. True. I was too simpli

Re: [rust-dev] Three level memory system

2011-05-16 Thread Tim Chevalier
On Mon, May 16, 2011 at 10:37 AM, Andreas Gal wrote: > > On May 16, 2011, at 8:30 AM, Tim Chevalier wrote: > >> On Sun, May 15, 2011 at 11:42 PM, Graydon Hoare wrote: >>> This statement is highly debatable. There are several kinds of GC and >>> several kinds of RC, and they both have different ca

Re: [rust-dev] Three level memory system

2011-05-16 Thread Andreas Gal
On May 16, 2011, at 8:30 AM, Tim Chevalier wrote: > On Sun, May 15, 2011 at 11:42 PM, Graydon Hoare wrote: >> This statement is highly debatable. There are several kinds of GC and >> several kinds of RC, and they both have different cache behavior (GC trashes >> the whole cache regularly and dou

Re: [rust-dev] Three level memory system

2011-05-16 Thread Tim Chevalier
On Sun, May 15, 2011 at 11:42 PM, Graydon Hoare wrote: > This statement is highly debatable. There are several kinds of GC and > several kinds of RC, and they both have different cache behavior (GC trashes > the whole cache regularly and doubles heap pressure; RC hurts cache > coherence *if* you'r

Re: [rust-dev] Three level memory system

2011-05-15 Thread Graydon Hoare
On 15/05/2011 7:34 AM, john skaller wrote: I'm intrigued by the 3 level memory system (stack, ref count, gc) and wonder how that works out in practice. Does it ever get in the way? Not sure. We don't have enough experience with it yet. We'll be better able to answer this in a few months. I'

[rust-dev] Three level memory system

2011-05-15 Thread john skaller
I'm intrigued by the 3 level memory system (stack, ref count, gc) and wonder how that works out in practice. Does it ever get in the way? I'm also a bit curious about ref counting. As a memory management technique it is known to be slower than a good GC, partly because of the overhead of managing