Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 1780 invoked from network); 7 Jan 2009 22:50:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Jan 2009 22:50:53 -0000 Received: (qmail 39443 invoked by uid 500); 7 Jan 2009 22:50:51 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 39409 invoked by uid 500); 7 Jan 2009 22:50:51 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 39398 invoked by uid 99); 7 Jan 2009 22:50:51 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 14:50:51 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aleksey.shipilev@gmail.com designates 209.85.198.238 as permitted sender) Received: from [209.85.198.238] (HELO rv-out-0506.google.com) (209.85.198.238) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Jan 2009 22:50:43 +0000 Received: by rv-out-0506.google.com with SMTP id f9so7578307rvb.5 for ; Wed, 07 Jan 2009 14:50:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=Kgc2Sn+AX/+CWblAXXqLqsIzsn16vnxht/mxLFXpZV4=; b=bVbmRcdKTYuOBs54Fe/roiEfyDlzMyjfwoVAqFcDB3/vFQYEotuMRfwlgS5W8PRclt J1z73hcsv345CGVa1z+3aFDQ2X3kMUwjo4v9BQg8OLFHgYGsS1NAqe5iq797IQV3sbdX LVHxUEGK+HK8px0c3f/Q7FdAeYUHb7Ugekhv4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=nKNPs4+iNxYilykT2rwD4FI04uMkwClkL5fpK5ngKcxUclkfyuB65OV0nFeszySPTR okcM6Eyha5s4BnyeD+mDkcex6fNRATcTFVl0wmu+pXgEYRysuVlSzAsQM8naynYdtu1a qMCYO0lIul27BZd1YsmNoCtM/0mg4zVFn7X48= Received: by 10.141.136.4 with SMTP id o4mr11744424rvn.90.1231368621924; Wed, 07 Jan 2009 14:50:21 -0800 (PST) Received: by 10.141.198.7 with HTTP; Wed, 7 Jan 2009 14:50:21 -0800 (PST) Message-ID: <4bebff790901071450k238f4b82rfb3ab6bf8cdeb55e@mail.gmail.com> Date: Thu, 8 Jan 2009 01:50:21 +0300 From: "Aleksey Shipilev" To: dev@harmony.apache.org Subject: Re: [jira] Commented: (HARMONY-6056) [classlib][jit][opt][performance] Optimize heap allocations in String(String, int) constructor for JIT In-Reply-To: <4964C7C7.5060005@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1100194590.1229915264310.JavaMail.jira@brutus> <49092120.1231268324402.JavaMail.jira@brutus> <70c713190901061950l53b326c0hc19b4adaf2469877@mail.gmail.com> <4bebff790901070102w4183c200v16af97378e7843cd@mail.gmail.com> <4964C05B.2080801@gmail.com> <4bebff790901070655v28fb59c0od8884af26e110e78@mail.gmail.com> <4964C7C7.5060005@gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi, I had some spare time and made the benchmark [1] for this issue (never do the performance optimizations without the benchmarks covering your case :)). Presumably the good patch for the issue should increase the score on this benchmark. If my understanding is good, the boost should be observed on J9 with Kevin's version of the patch. The boost on DRLVM should be observed with the final patch. Thanks, Aleksey. On Harmony-M7 at P-D 2.8 Ghz / PC2-5300 / Gentoo Linux x86: $ harmony-M7/bin/ava -Xms1024M -Xmx1024M -server -jar StringBench.jar (String)base + (int)add: ------------------------------------------- base length (vars with rows): 0..2..10 add length (vars with cols): 0..2..10 loop duration = 100 msecs target variance = 0.05 ops/msec, the more the better: 4369, 2842, 1976, 1563, 1226, 4462, 2829, 1966, 1555, 1225, 4430, 2836, 1956, 1563, 1223, 4394, 2831, 1956, 1558, 1217, 4357, 2821, 1954, 1551, 1217, Thanks, Aleksey. [1] https://issues.apache.org/jira/secure/attachment/12397340/StringBench.jar On Wed, Jan 7, 2009 at 6:18 PM, Tim Ellison wrote: > Aleksey Shipilev wrote: >> Ok, we can implement the in-place Integer.toString() and specialize >> the radix-10 conversion in Integer. Then Classlib performance guys >> might use the inplace conversion to optimize StringBuilder performance >> or even catch the concatenation like J9 does. >> >> My idea is to share whatever optimization between all VMs that use the Classlib. > > indeed! > >