lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley" <ysee...@gmail.com>
Subject Re: Re[2]: (byte)((i & 0x7f) | 0x80) == (byte)(i | 0x80)
Date Wed, 26 Apr 2006 18:23:02 GMT
On 4/26/06, Marvin Humphrey <marvin@rectangular.com> wrote:
> So the question is, does this assertion hold?
>
>    (byte)((i & 0x7f) | 0x80) == (byte)(i | 0x80)

Yes.

I tested just this out, and java5 -server reports a 15% performance boost for
writeVInt alone,  tested over numbers from 1 to 1000000.  Of course
the overall boost is likely to be very small, It's a very simple
change to make.

-Yonik
http://incubator.apache.org/solr Solr, the open-source Lucene search server

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message