Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 37053 invoked from network); 18 May 2005 14:16:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 18 May 2005 14:16:30 -0000 Received: (qmail 33195 invoked by uid 500); 18 May 2005 14:06:22 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 33121 invoked by uid 500); 18 May 2005 14:06:20 -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 33029 invoked by uid 99); 18 May 2005 14:06:19 -0000 X-ASF-Spam-Status: No, hits=0.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of david.griffiths@gmail.com designates 64.233.162.200 as permitted sender) Received: from zproxy.gmail.com (HELO zproxy.gmail.com) (64.233.162.200) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 18 May 2005 07:06:17 -0700 Received: by zproxy.gmail.com with SMTP id 12so178955nzp for ; Wed, 18 May 2005 07:06:01 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=nteUes9W1JDNp353F0Ky0tMNldX45oFu6d7XCjWA1NAGmlv+tDpduiOuGdajz9XwlPRYmt2zBQGONnuRE35YW1sFEeraiX6CTS0NlvEJBtNb+g4WMrBlVaUUW9a3AJg5fN3/zAYCcT1BJVrpSz7fE1DgNVYvxbXUDXr0xLNsDoU= Received: by 10.36.19.12 with SMTP id 12mr125550nzs; Wed, 18 May 2005 07:06:01 -0700 (PDT) Received: by 10.36.23.10 with HTTP; Wed, 18 May 2005 07:06:01 -0700 (PDT) Message-ID: <892f710b050518070637147bdb@mail.gmail.com> Date: Wed, 18 May 2005 15:06:01 +0100 From: David Griffiths Reply-To: David Griffiths To: harmony-dev@incubator.apache.org, Steve.Blackburn@anu.edu.au Subject: Re: Against using Java to implement Java (Was: Java) In-Reply-To: <428B44FA.3050503@anu.edu.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <42845E09.7010507@algroup.co.uk> <4284E445.20303@apache.org> <892f710b0505170251627dea61@mail.gmail.com> <892f710b050518033033b503d7@mail.gmail.com> <4dd1f3f005051805556d52eff5@mail.gmail.com> <428B44FA.3050503@anu.edu.au> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I know, but despite the subject line my original point was about the problem of modularizing a VM written in C. Cheers, Dave On 5/18/05, Steve Blackburn wrote: > This subject has been covered in detail at least twice already. >=20 > There is no need for any function call on the fast path of the > allocation sequence. In a Java in Java VM the allocation sequence is > inlined into the user code. This has considerable advantages over "a > few lines of assembler". Aside from the obvious advantage of not having > to express your allocator in assembler, using Java also compiles to > better code since the code can be optimized in context (register > allocation, constant folding etc), producing much better code than hand > crafted assembler. >=20 > However this is small fry compared to the importance of compiling write > barriers correctly (barriers are used by most high performance GCs and > are executed far more frequently than allocations). The same argument > applies though. The barrier expressed in Java is inlined insitu, and > the optimizing compiler is able to optimize in context. >=20 > Modularization does not imply any of this. >=20 > --Steve >=20 >=20 > Weldon Washburn wrote: >=20 > >On 5/18/05, David Griffiths wrote: > > > > > >>I think it's too slow to have the overhead of a function call for > >>every object allocation. This is the cost of modularization. I doubt > >>any of the mainstream JVMs you are competing with do this. > >> > >> > >Yes. I agree. A clean interface would have a function call for every > >object allocation. However if the allocation code itself is only a > >few lines of assemby, it can be inlined by the JIT. Using a moving > >GC, it is possible to get the allocation sequence down to a bump the > >pointer and a compare to see if you have run off the end of the > >allocation area. > > > > >