From harmony-dev-return-2375-apmail-incubator-harmony-dev-archive=incubator.apache.org@incubator.apache.org Tue Nov 01 13:26:05 2005 Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 70018 invoked from network); 1 Nov 2005 13:26:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Nov 2005 13:26:05 -0000 Received: (qmail 89841 invoked by uid 500); 1 Nov 2005 13:26:02 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 89757 invoked by uid 500); 1 Nov 2005 13:26:01 -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 89746 invoked by uid 99); 1 Nov 2005 13:26:01 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 05:26:01 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [150.203.2.45] (HELO anumail5.anu.edu.au) (150.203.2.45) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Nov 2005 05:25:56 -0800 Received: from smtphost.anu.edu.au (stats.anu.edu.au [150.203.2.50]) by anumail5.anu.edu.au (8.13.4/8.13.4) with ESMTP id jA1DPbqk029479 for ; Wed, 2 Nov 2005 00:25:37 +1100 (EST) Received: from sqmail.anu.edu.au (sqmail.anu.edu.au [150.203.2.99]) by smtphost.anu.edu.au (8.13.4/8.13.4) with ESMTP id jA1DPbYm025747 for ; Wed, 2 Nov 2005 00:25:37 +1100 (EST) Received: from 202.55.156.42 (SquirrelMail authenticated user u3401953) by sqmail.anu.edu.au with HTTP; Wed, 2 Nov 2005 00:25:37 +1100 (EST) Message-ID: <63291.202.55.156.42.1130851537.squirrel@sqmail.anu.edu.au> In-Reply-To: <63280.202.55.156.42.1130850573.squirrel@sqmail.anu.edu.au> References: <43669468.4090205@dedasys.com> <8cca42d80510311433r66636d23mb3044a568736180@mail.gmail.com> <4366E968.4010607@anu.edu.au> <8cca42d80511010454y34ae0e55w9cd35babd94d1b18@mail.gmail.com> <63280.202.55.156.42.1130850573.squirrel@sqmail.anu.edu.au> Date: Wed, 2 Nov 2005 00:25:37 +1100 (EST) Subject: Re: half-baked idea? j2me From: "Robin Garner" To: harmony-dev@incubator.apache.org User-Agent: SquirrelMail/1.4.4-xss MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-PMX-Version: 4.7.1.128075, Antispam-Engine: 2.1.0.0, Antispam-Data: 2005.11.1.8 internal X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N >> On 11/1/05, Robin Garner wrote: >>> Rodrigo Kumpera wrote: >>> >>> >AFAIK IKVM, sablevm and jamvm all run on portable devices. >>> > >>> >Developing a j2me jvm is not as easier as it seens, first, the >>> >footprint and execution performance must be really optimized, so >>> >expect a LOT of assembly coding. >>> > >>> > >>> Back to the language wars again :) This does not necessarily follow. >>> Try googling for the 'squawk' VM - they had a poster at OOPSLA last >>> week. This is a java-in-java virtual machine targetted at embedded >>> devices. The core VM runs in 80KB of memory. Device drivers are all >>> written in Java. >>> >> >> Robin, >> >> With a java-in-java VM even if you don't write directly in assembly >> you still need to generate machine code with java anyway, and that >> will look a lot like asm (JikesRVM baseline JITer for example). With >> C, for example, you can get away using just an interpreter. > > My mistake, obviously. When you said "performance must be really > optimized, so expect a LOT of assembly coding", I assumed you were saying > that large chunks of the VM would need to be written in assembler in order > to get adequate performance. > > So what _was_ the point you were making ? Actually to be more constructive, I think there is a deeper issue here. If an interpreter will give adequate performance, then it can certainly be written in an ahead-of-time compiled language with little or no call to do any assembly-like coding. If you actually need the additional performance you can get from a compiler, then there is no alternative to writing assembler in some shape or other. The JikesRVM compilers are good examples of the extremes here - the baseline compiler is virtually straight assembler (or a java representation thereof), while the opt compilers use all sorts of techniques to avoid actually specifying machine instructions directly. So while all compilers need to emit machine instructions (after all, that's what they do), there is very little need (given an adequate compiler) to write code in assembler, no matter what language it is written in. There's a perfectly adequate AOT java compiler out there, so anything you can do in C can be done in Java with a little assistance from the compiler. cheers