Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 75614 invoked from network); 14 Mar 2007 11:00:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2007 11:00:30 -0000 Received: (qmail 8883 invoked by uid 500); 14 Mar 2007 11:00:38 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 8860 invoked by uid 500); 14 Mar 2007 11:00:38 -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 8851 invoked by uid 99); 14 Mar 2007 11:00:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 04:00:38 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Mar 2007 04:00:29 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 78815714044 for ; Wed, 14 Mar 2007 04:00:09 -0700 (PDT) Message-ID: <20029269.1173870009489.JavaMail.jira@brutus> Date: Wed, 14 Mar 2007 04:00:09 -0700 (PDT) From: "Sergey Kuksenko (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-3392) [Classlib][luni][performance] Improvement of java.lang.(Ineteger,Short,Long,Character).valueOf() methods MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [Classlib][luni][performance] Improvement of java.lang.(Ineteger,Short,Long,Character).valueOf() methods -------------------------------------------------------------------------------------------------------- Key: HARMONY-3392 URL: https://issues.apache.org/jira/browse/HARMONY-3392 Project: Harmony Issue Type: Improvement Components: Classlib Environment: All Reporter: Sergey Kuksenko Attachments: luni_caches.patch Performance optimization done for the methods: java.lang.Short.valueOf(), java.lang.Character.valueOf(),java.lang.Integer.valueOf(), java.lang.Long.valueOf(). Currently, small values are cached for these wrappers. Implementation of caching is rather ineffective, because of presence of synchronization. If several threads creates wrappers (boxing) it may cause unnecessary synchronization contention and performance degradation. Attached patch contains correct modification of "valueOf" methods, all unnecessary synchronizations are removed. Also, it makes sense to remove object comparisons ("this==object") from "equals" methods. For such small wrappers, it is much faster and easier to compare wrapped values without preliminary reference comparison. Besides, the patch fixes HARMONY-2454 issue. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.