Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 20330 invoked from network); 24 Aug 2009 16:41:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Aug 2009 16:41:59 -0000 Received: (qmail 78782 invoked by uid 500); 24 Aug 2009 12:42:23 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 78696 invoked by uid 500); 24 Aug 2009 12:42:23 -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 78688 invoked by uid 99); 24 Aug 2009 12:42:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 24 Aug 2009 12:42:23 +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, 24 Aug 2009 12:42:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D7009234C055 for ; Mon, 24 Aug 2009 05:41:59 -0700 (PDT) Message-ID: <1691606068.1251117719879.JavaMail.jira@brutus> Date: Mon, 24 Aug 2009 05:41:59 -0700 (PDT) From: "Yonik Seeley (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Commented: (LUCENE-1607) String.intern() faster alternative In-Reply-To: <471081983.1240154567606.JavaMail.jira@brutus> 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/LUCENE-1607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746845#action_12746845 ] Yonik Seeley commented on LUCENE-1607: -------------------------------------- {quote} isn't it possible to make the call to public String intern(char[] arr, int offset, int len) {} not create a String? {quote} Yep - that's why I added that method (just didn't get around to implementing it that way). > String.intern() faster alternative > ---------------------------------- > > Key: LUCENE-1607 > URL: https://issues.apache.org/jira/browse/LUCENE-1607 > Project: Lucene - Java > Issue Type: Improvement > Reporter: Earwin Burrfoot > Assignee: Yonik Seeley > Fix For: 2.9 > > Attachments: intern.patch, LUCENE-1607-contrib.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch, LUCENE-1607.patch > > > By using our own interned string pool on top of default, String.intern() can be greatly optimized. > On my setup (java 6) this alternative runs ~15.8x faster for already interned strings, and ~2.2x faster for 'new String(interned)' > For java 5 and 4 speedup is lower, but still considerable. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org