Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 40445 invoked from network); 13 May 2005 00:44:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 May 2005 00:44:24 -0000 Received: (qmail 94227 invoked by uid 500); 13 May 2005 00:48:31 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 94180 invoked by uid 500); 13 May 2005 00:48:30 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 94166 invoked by uid 99); 13 May 2005 00:48:30 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of tromey@redhat.com designates 66.187.233.31 as permitted sender) Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 12 May 2005 17:48:30 -0700 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j4D0iGHn030128 for ; Thu, 12 May 2005 20:44:16 -0400 Received: from opsy.redhat.com (vpn50-11.rdu.redhat.com [172.16.50.11]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j4D0iFO18738; Thu, 12 May 2005 20:44:15 -0400 Received: by opsy.redhat.com (Postfix, from userid 500) id C017C2DD1DE; Thu, 12 May 2005 18:41:28 -0600 (MDT) Sender: tromey@redhat.com To: harmony-dev@incubator.apache.org Subject: Re: JIT vs. WAT References: From: Tom Tromey Reply-To: tromey@redhat.com X-Attribution: Tom Date: 12 May 2005 18:41:28 -0600 In-Reply-To: Message-ID: Lines: 42 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >>>>> "Bob" == Bob writes: Bob> There's a lot of discussion on JIT vs. WAT. I think I can lay down Bob> some framework on the issue. Bob> WAT-compiled code requires a smaller runtime system, their programs Bob> load faster, they probably use less memory at runtime, and they run at Bob> a (more) consistent speed. This makes WATs especially well-suited for Bob> PDAs and other mobile devices, which may not have an extra few dozen Bob> megabytes to spare for a full JIT-based Java system. And, we think, desktop and small utility use, where the benefits of reduced startup times and shared libraries are felt more strongly. Bob> GCJ begins to fall short where you wish to use Java's dynamic Bob> loading/linking capabilities. Classes must be loaded dynamically, Bob> garbage collected when they're no longer used, and integrated with the Bob> existing code. They must be bytecode-verified and sandboxed. I'm Bob> sure that someone who's really clever could make this all work under Bob> GCJ. We've basically done all that in the gcc 4.0 release. There is a new ABI that does all its linking at runtime (at some performance cost). Verification works even for precompiled code. The origin of classes is irrelevant; they are looked up in a shared library database; I like to describe gcj as a "caching jit". You can even run gcj itself as a jit (in response to an uncompiled class, compile it to a .so that is then loaded), but this mode still has some scalability problems. This does mean that, at the moment, things like runtime bytecode instrumentation (AOP and friends) don't mix that well with the gcj approach. Bob> Finally, as of last summer, GCJ was not "drop-in" compatible with Bob> Sun's javac. You cannot just take an Ant script and replace "javac" Bob> with "gcj" and have it all work. This is the role that the java-gcj-compat package fills. jpackage-style alternatives basically solve all the problems in this area. Tom