Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 43048 invoked from network); 9 Jan 2009 10:03:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jan 2009 10:03:23 -0000 Received: (qmail 13714 invoked by uid 500); 9 Jan 2009 10:03:23 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 13619 invoked by uid 500); 9 Jan 2009 10:03:22 -0000 Mailing-List: contact commits-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 commits@harmony.apache.org Received: (qmail 13610 invoked by uid 99); 9 Jan 2009 10:03:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2009 02:03:22 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 Jan 2009 10:03:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id BCA7B234C495 for ; Fri, 9 Jan 2009 02:02:59 -0800 (PST) Message-ID: <1226662808.1231495379771.JavaMail.jira@brutus> Date: Fri, 9 Jan 2009 02:02:59 -0800 (PST) From: "Jim Yu (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-6068) [luni] Improve Integer.toString(int) performance In-Reply-To: <1176442316.1231405263376.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6068?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jim Yu updated HARMONY-6068: ---------------------------- Attachment: HARMONY-6068-final-V2.diff > [luni] Improve Integer.toString(int) performance > ------------------------------------------------ > > Key: HARMONY-6068 > URL: https://issues.apache.org/jira/browse/HARMONY-6068 > Project: Harmony > Issue Type: Improvement > Components: Classlib > Affects Versions: 5.0M8 > Reporter: Jim Yu > Assignee: Tim Ellison > Fix For: 5.0M9 > > Attachments: HARMONY-6068-final-V2.diff, HARMONY-6068-final.diff, HARMONY-6068-merged-v1.diff, HARMONY-6068-merged-v2.diff, HARMONY-6068.diff > > Original Estimate: 24h > Remaining Estimate: 24h > > I very agree with Aleksey Shipilev' comment [1] for JIRA HARMONY-6056 as following, so I implement an optimized algorithm for Integer.toString(int) method. Thanks to Aleksey Shipilev's benchmark, here are the test results[2] on my windows platform. > [1] "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." > [2] > Result for Harmony java6 branch: > (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: > 6721, 6096, *4650, *3846, *3178, > *8080, *5833, *4447, 3731, 3048, > *7985, *5848, 4788, 3727, *3114, > *7891, 5592, *4389, *3560, 3048, > 8388, 5607, *4522, 3727, 3051, > After applied my patch: > (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: > 8322, 6721, 4791, 4788, 4788, > 8388, 6721, 5156, *5012, 4797, > 8388, 6707, 5161, *4963, 4795, > 8388, 6707, *5126, 4802, 4788, > *8048, 6700, *5021, 4802, *4687, -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.