Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@minotaur.apache.org Received: (qmail 90318 invoked from network); 22 Apr 2009 20:59:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Apr 2009 20:59:08 -0000 Received: (qmail 96387 invoked by uid 500); 22 Apr 2009 20:59:08 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 96355 invoked by uid 500); 22 Apr 2009 20:59:08 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 96345 invoked by uid 99); 22 Apr 2009 20:59:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2009 20:59:08 +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; Wed, 22 Apr 2009 20:59:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 6D0E6234C003 for ; Wed, 22 Apr 2009 13:58:47 -0700 (PDT) Message-ID: <580657455.1240433927432.JavaMail.jira@brutus> Date: Wed, 22 Apr 2009 13:58:47 -0700 (PDT) From: "Erik Holstad (JIRA)" To: hbase-dev@hadoop.apache.org Subject: [jira] Created: (HBASE-1337) Using byte[] compare instead of long compare when needed to convert to long first. 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 Using byte[] compare instead of long compare when needed to convert to long first. ---------------------------------------------------------------------------------- Key: HBASE-1337 URL: https://issues.apache.org/jira/browse/HBASE-1337 Project: Hadoop HBase Issue Type: Improvement Affects Versions: 0.20.0 Reporter: Erik Holstad Priority: Minor When comparing timestamps in the KeyValues tests have shown that it is faster to do a byte[] compare on the timestamps rather than converting to longs and then do the long compare. In the case where you have one byte[] and one long that you need to compare it is better to convert both to long and do the long compare. Some numbers: Compare byte[] to byte[] timer 1042 ns Compare bytes2long to bytes2long timer 3143 ns Compare long to long timer 281 ns bytes2long timer 1328 ns long2bytes timer 1349 ns -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.