Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 73121 invoked from network); 4 Sep 2009 09:20:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 4 Sep 2009 09:20:21 -0000 Received: (qmail 60577 invoked by uid 500); 4 Sep 2009 09:20:21 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 60471 invoked by uid 500); 4 Sep 2009 09:20:20 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 60461 invoked by uid 99); 4 Sep 2009 09:20:20 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2009 09:20:20 +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; Fri, 04 Sep 2009 09:20:18 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CAC06234C1EF for ; Fri, 4 Sep 2009 02:19:58 -0700 (PDT) Message-ID: <1865242225.1252055998829.JavaMail.jira@brutus> Date: Fri, 4 Sep 2009 02:19:58 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (LANG-523) StrBuilder is slow In-Reply-To: <1057673553.1250856674781.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/LANG-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Henri Yandell updated LANG-523: ------------------------------- Fix Version/s: 2.x 3.0 Confirmed. > StrBuilder is slow > ------------------ > > Key: LANG-523 > URL: https://issues.apache.org/jira/browse/LANG-523 > Project: Commons Lang > Issue Type: Improvement > Affects Versions: 2.4 > Reporter: Stefan Zeller > Fix For: 3.0, 2.x > > Attachments: patch.txt, Test.java > > > I need a faster StringBuffer for java 1.4 branch. > So I tested StrBuffer. The result is not sufficient as it is 500 times slower than StringBuffer. The problem is that currently the StrBuilder increases the buffer size by the length of the string that thought to be appended. > Changing this strategy to provide the double of the needed buffer size brings the performance near to the StringBuilder. > Here the times (the average of four runs in ms) for the Testcase attached. Where MyStrBuilder is the pathed version of StrBuilder > startStringBuffer: 105.25 > startStrBuilder: 5863.75 > startStringBuilder: 55 > startMyStringBuilder: 54 -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.