Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 51284 invoked from network); 11 Feb 2008 22:24:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Feb 2008 22:24:40 -0000 Received: (qmail 38973 invoked by uid 500); 11 Feb 2008 22:24:34 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 38948 invoked by uid 500); 11 Feb 2008 22:24:33 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 38939 invoked by uid 99); 11 Feb 2008 22:24:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Feb 2008 14:24:33 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [68.142.229.92] (HELO smtp113.sbc.mail.re2.yahoo.com) (68.142.229.92) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 11 Feb 2008 22:24:02 +0000 Received: (qmail 43995 invoked from network); 11 Feb 2008 22:24:08 -0000 Received: from unknown (HELO ?9.72.133.115?) (ddebrunner@sbcglobal.net@32.97.110.142 with plain) by smtp113.sbc.mail.re2.yahoo.com with SMTP; 11 Feb 2008 22:24:08 -0000 X-YMail-OSG: rNTOKBoVM1m60VQ4W1J3_HOOAltHaK43zDBTf24dmy_owClH1wvjgWBb8HZWPbOKG04qim23Zq8.iqE_yh_bSFZlT0K0r9SEbZshMTqVP7_EMwwNJG4bcLetGAvuUUMcaE8bBOka_oI7eXc- X-Yahoo-Newman-Property: ymail-3 Message-ID: <47B0CB0A.5090803@apache.org> Date: Mon, 11 Feb 2008 14:24:10 -0800 From: Daniel John Debrunner User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: derby-dev@db.apache.org Subject: Re: Reducing module dependencies References: <2304A729-F547-443A-B95A-A0E0E8ECA664@mazumdar.demon.co.uk> <47AFD635.4060103@apache.org> <2B60F374-BCE9-43B9-B084-20464778F1CE@mazumdar.demon.co.uk> <47B0C48C.5070407@apache.org> <429CEEE8-11D2-4BEA-BB15-5266BF77F4DA@mazumdar.demon.co.uk> In-Reply-To: <429CEEE8-11D2-4BEA-BB15-5266BF77F4DA@mazumdar.demon.co.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Dibyendu Majumdar wrote: >> 2) Such constants would probably no-longer be in-lined by the java >> compiler, leading to potentially slower code as a field lookup is needed. > > Not sure about this, as a final value should be in-lined regardless of > how it is initialized. But this can be tested, I suppose. I mean a final field in class A can only be in-lined in class B at compile (java source to byte-code) time if the compiler can determine its value. I think this is only currently true if the field is a literal (or set to another final field that is sourced from a literal). If the final value comes from file through a method call then the compile will not be able to in-line it. At runtime the jit can probably in-line, but that's not what I meant. Dan.