Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 52078 invoked from network); 26 Apr 2006 16:25:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Apr 2006 16:25:20 -0000 Received: (qmail 39556 invoked by uid 500); 26 Apr 2006 16:25:17 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 39523 invoked by uid 500); 26 Apr 2006 16:25:17 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 39512 invoked by uid 99); 26 Apr 2006 16:25:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Apr 2006 09:25:17 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of charliecmo@gmail.com designates 64.233.184.239 as permitted sender) Received: from [64.233.184.239] (HELO wproxy.gmail.com) (64.233.184.239) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Apr 2006 09:25:16 -0700 Received: by wproxy.gmail.com with SMTP id 50so1399338wri for ; Wed, 26 Apr 2006 09:24:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:x-mailer:reply-to:x-priority:message-id:to:subject:mime-version:content-type:content-transfer-encoding:from; b=UKdxEQQOhsJdrCIpSxW4mDMecJ9NnCu//3NHVdckNNY6a5k8ggAwch2PKSAx6DYD2PAwJpbpIAXl7TycGiYHnsDq+D+F3bW4O1ib6qugMa7hGwboiPf3TNPTVrSvF45BDC7UKjzqAJIvGMDc/u1vzpl05m+ugNH5uMSfyeVStJ4= Received: by 10.54.147.19 with SMTP id u19mr7464520wrd; Wed, 26 Apr 2006 09:24:52 -0700 (PDT) Received: from cmo.mshome.net ( [129.111.227.179]) by mx.gmail.com with ESMTP id 9sm527754wrl.2006.04.26.09.24.51; Wed, 26 Apr 2006 09:24:52 -0700 (PDT) Date: Wed, 26 Apr 2006 11:24:44 -0500 X-Mailer: The Bat! (v3.5) Professional Reply-To: Charlie X-Priority: 3 (Normal) Message-ID: <894606852.20060426112444@gmail.com> To: java-dev@lucene.apache.org Subject: (byte)((i & 0x7f) | 0x80) == (byte)(i | 0x80) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit From: Charlie X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hello, In: public abstract class IndexOutput public void writeVInt(int i) writeByte((byte)((i & 0x7f) | 0x80)); I thought (byte)((i & 0x7f) | 0x80) == (byte)(i | 0x80) As (byte) is able to truncate the last byte for us already, no need of (& 0x7f). If so, we may change that line to writeByte((byte)(i | 0x80)); and may speed up a little bit. Correct me if (i & 0x7f) is necessary. Thank you. -- Best regards, Charlie --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org