Return-Path: Delivered-To: apmail-hadoop-hdfs-issues-archive@minotaur.apache.org Received: (qmail 34325 invoked from network); 7 Sep 2009 14:47:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Sep 2009 14:47:22 -0000 Received: (qmail 2781 invoked by uid 500); 7 Sep 2009 14:47:22 -0000 Delivered-To: apmail-hadoop-hdfs-issues-archive@hadoop.apache.org Received: (qmail 2669 invoked by uid 500); 7 Sep 2009 14:47:22 -0000 Mailing-List: contact hdfs-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hdfs-issues@hadoop.apache.org Delivered-To: mailing list hdfs-issues@hadoop.apache.org Received: (qmail 2403 invoked by uid 99); 7 Sep 2009 14:47:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Sep 2009 14:47:21 +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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Sep 2009 14:47:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AC738234C4AF for ; Mon, 7 Sep 2009 07:46:57 -0700 (PDT) Message-ID: <769362169.1252334817705.JavaMail.jira@brutus> Date: Mon, 7 Sep 2009 07:46:57 -0700 (PDT) From: "Hudson (JIRA)" To: hdfs-issues@hadoop.apache.org Subject: [jira] Commented: (HDFS-288) Redundant computation in hashCode() implemenation 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/HDFS-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12752152#action_12752152 ] Hudson commented on HDFS-288: ----------------------------- Integrated in Hadoop-Hdfs-trunk #75 (See [http://hudson.zones.apache.org/hudson/job/Hadoop-Hdfs-trunk/75/]) . Redundant computation in hashCode() implementation. Contributed by Tsz Wo (Nicholas), SZE. > Redundant computation in hashCode() implemenation > ------------------------------------------------- > > Key: HDFS-288 > URL: https://issues.apache.org/jira/browse/HDFS-288 > Project: Hadoop HDFS > Issue Type: Improvement > Reporter: Tsz Wo (Nicholas), SZE > Assignee: Tsz Wo (Nicholas), SZE > Fix For: 0.21.0 > > Attachments: h288_20090820.patch > > > In some hashCode() implementation (e.g. Block.hashCode()), the formula has the form > {noformat} > 37 * 17 + f(x), > {noformat} > where f( x ) is some function. Adding 37*17 to f( x ) shifts the value of f( x ). It is not effective to do shifting in hash functions. The computation is redundant. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.