Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 6187 invoked from network); 17 Nov 2005 20:40:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 17 Nov 2005 20:40:07 -0000 Received: (qmail 11297 invoked by uid 500); 17 Nov 2005 20:40:04 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 11097 invoked by uid 500); 17 Nov 2005 20:40:03 -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 11085 invoked by uid 99); 17 Nov 2005 20:40:02 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Nov 2005 12:40:02 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 7F377E1 for ; Thu, 17 Nov 2005 21:39:41 +0100 (CET) Message-ID: <345512900.1132259981472.JavaMail.jira@ajax.apache.org> Date: Thu, 17 Nov 2005 21:39:41 +0100 (CET) From: "Paul Smith (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-467) Use Float.floatToRawIntBits over Float.floatToIntBits In-Reply-To: <1619768435.1132179448609.JavaMail.jira@ajax.apache.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/LUCENE-467?page=comments#action_12357925 ] Paul Smith commented on LUCENE-467: ----------------------------------- If you can create a patch against 1.4.3 there is a reasonable possibility that I could create a 1.4.3 Lucene+ThisPatch jar and re-index in our test environment that was the source of the YourKit graph I provided earlier. This should reflect how useful the change might be against a decent baseline? > Use Float.floatToRawIntBits over Float.floatToIntBits > ----------------------------------------------------- > > Key: LUCENE-467 > URL: http://issues.apache.org/jira/browse/LUCENE-467 > Project: Lucene - Java > Type: Improvement > Components: Other > Versions: 1.9 > Reporter: Yonik Seeley > Priority: Minor > > Copied From my Email: > Float.floatToRawIntBits (in Java1.4) gives the raw float bits without > normalization (like *(int*)&floatvar would in C). Since it doesn't do > normalization of NaN values, it's faster (and hopefully optimized to a > simple inline machine instruction by the JVM). > On my Pentium4, using floatToRawIntBits is over 5 times as fast as > floatToIntBits. > That can really add up in something like Similarity.floatToByte() for > encoding norms, especially if used as a way to compress an array of > float during query time as suggested by Doug. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org