Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 96250 invoked from network); 22 Sep 2010 10:32:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 22 Sep 2010 10:32:19 -0000 Received: (qmail 10396 invoked by uid 500); 22 Sep 2010 10:32:19 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 10087 invoked by uid 500); 22 Sep 2010 10:32:18 -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 10020 invoked by uid 99); 22 Sep 2010 10:32:17 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 10:32:17 +0000 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.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Sep 2010 10:31:59 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o8MAVcHt006279 for ; Wed, 22 Sep 2010 10:31:38 GMT Message-ID: <7687541.339411285151498537.JavaMail.jira@thor> Date: Wed, 22 Sep 2010 06:31:38 -0400 (EDT) From: "Hudson (JIRA)" To: commits@harmony.apache.org Subject: [jira] Commented: (HARMONY-6635) FloatingPointParser uses toLowerCase unnecessarily In-Reply-To: <13317014.1301282810913652.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-6635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913490#action_12913490 ] Hudson commented on HARMONY-6635: --------------------------------- Integrated in Harmony-select-1.5-head-linux-x86_64 #115 (See [https://hudson.apache.org/hudson/job/Harmony-select-1.5-head-linux-x86_64/115/]) Apply patch for HARMONY-6635 (FloatingPointParser uses toLowerCase unnecessarily) > FloatingPointParser uses toLowerCase unnecessarily > -------------------------------------------------- > > Key: HARMONY-6635 > URL: https://issues.apache.org/jira/browse/HARMONY-6635 > Project: Harmony > Issue Type: Improvement > Environment: Android 2.2 > Reporter: Gaz Davidson > Assignee: Tim Ellison > Fix For: 5.0M15 > > Attachments: harmony-6635.patch > > > A lot of time is being eaten inside FloatingPointParser.java calling String.toLowerCase when testing for "hex float" types. > > if (s.toLowerCase().indexOf("0x") != -1) > I imagine that such hex float numbers are very rare, so this is a huge waste of time in the general case. > I haven't tested this, but it looks to me like the string is already trimmed and so checking at a specific location should speed this up considerably: > > if (s.size() > 2 && s.charAt(0) =='0' && (s.charAt(1) == 'x' || s.charAt(1) == 'X')) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.