Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: BGB Newsgroups: comp.lang.java.programmer Subject: Re: Managed-Code Bloat Date: Tue, 07 Jun 2011 00:37:03 -0700 Organization: albasani.net Lines: 42 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net Bp7r3Vur3pwguJQMxiEhOGxAw0nae+J5ClrFRRHlOPjrhrqzBSo7BYxYFcqdxx7mA0CY+yb9r1kNuJcEvW81LA== NNTP-Posting-Date: Tue, 7 Jun 2011 07:40:17 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="DjtDok7evokXdssS1rcUkh2dhrkl+FSdyTjazs5UlvWcWgK4L23UV2ejNBtfC0qv5XbKDwU3BR0j2jxdn2RPTtUFQkQgo/03eF6JkYtnD4UUMlyLOiy/+g4H2msaD1O8"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 In-Reply-To: Cancel-Lock: sha1:oRbSI3QgJv4WMYLILdgoEZslsBg= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:5054 On 6/6/2011 8:13 PM, Joshua Cranmer wrote: > On 6/6/2011 6:38 PM, Lawrence D'Oliveiro wrote: >> In message, Joshua Cranmer wrote: >>> Both SpiderMonkey and V8 are garbage-collected. >> >> Probably same here. > > That is not the case. I have actually patched the source code to > SpiderMonkey myself, I have literally sat next to the people who work on > the engine, SpiderMonkey is garbage-collected. Mark-and-trace, although > the plan is to move to generational GC. I'm not so sure about V8, but > the page I linked to explicitly mentions generational garbage > collection, so I'm sure it's in the same boat. > > If you don't believe that, what would it take to get you to believe the > truth? A signed note from Brendan Eich himself? > yep... and my own language (partly derived from JavaScript) also uses GC, but it is based on conservative mark/sweep (similar to the Boehm GC). sadly, the problem with traditional generation GC strategies is that they would depend on having a precise GC, which has the major drawback of being notably painful to work with (apart from having to "pin"/"defile" pretty much any object which may be potentially referenced by "unsafe" C code). the tradeoff though is that precise generational GC's can get much better performance than conservative mark/sweep. however, my GC is used by nearly all of the C code as well, and with care, most GC stalls can be largely avoided (I am using it successfully with a 3D engine, doing an FPS style game). part of the trick though is that I am mostly treating the GC as if it were a manual MM, as in, freeing stuff when it is known no longer needed (and the script VM also has a few tricks to reduce garbage production as well...). or such...