From: Rick DeNatale Date: 2009-12-11T23:57:24+09:00 Subject: [ruby-core:27144] Re: Ruby's GC On Fri, Dec 11, 2009 at 9:40 AM, Yukihiro Matsumoto wrote: > Hi, > > In message "Re: [ruby-core:27142] Ruby's GC" > � �on Fri, 11 Dec 2009 23:02:48 +0900, Gon�alo Silva writes: > > |I've lately been talking to Narihiro Nakamura using twitter about Ruby's > |garbage collector. He started implementing a lazy sweep algorithm but I > |think we should try to implement a generational GC. Unfortunately this would > |need more work but I think that if Ruby's GC is going to change then it > |should be for the best. > | > |What do you think? > > I am happy to see someone to try generational GC. �A guy in Japan once > implemented a generational GC for Ruby, but it made Ruby run slower > for most of the cases, mostly due to write barrier cost. I suspect that the write barrier can be implemented rather efficiently depending on how memory layout is done. You need to be able to efficiently distinguish between mutations to references in old objects (which need to be remembered) and mutations in new objects, which don't. One interesting problem, is what effect a copying GC would have on the API to C extensions, since object addresses would no longer be stable over time. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale WWR: http://www.workingwithrails.com/person/9021-rick-denatale LinkedIn: http://www.linkedin.com/in/rickdenatale