Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 35402 invoked from network); 13 Dec 2007 01:35:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Dec 2007 01:35:06 -0000 Received: (qmail 67810 invoked by uid 500); 13 Dec 2007 01:34:55 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 67795 invoked by uid 500); 13 Dec 2007 01:34:55 -0000 Mailing-List: contact stdcxx-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: stdcxx-dev@incubator.apache.org Delivered-To: mailing list stdcxx-dev@incubator.apache.org Received: (qmail 67784 invoked by uid 99); 13 Dec 2007 01:34:55 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 12 Dec 2007 17:34:55 -0800 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Dec 2007 01:35:05 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 42DB7714244 for ; Wed, 12 Dec 2007 17:34:44 -0800 (PST) Message-ID: <28606527.1197509684269.JavaMail.jira@brutus> Date: Wed, 12 Dec 2007 17:34:44 -0800 (PST) From: "Martin Sebor (JIRA)" To: stdcxx-dev@incubator.apache.org Subject: [jira] Commented: (STDCXX-226) __rw::__rw_new_capacity() uses floating point math In-Reply-To: <23156904.1151519249845.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/STDCXX-226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12551189 ] Martin Sebor commented on STDCXX-226: ------------------------------------- You're right, I must have been looking at the wrong column. Mea culpa! I suspect the problem with the shift/add algorithm is in the carry as Douglas cautions in his paper. To fix it we'd probably have to drop down a level to the assembly, which I'm sure we don't want to do given that your algorithm is faster to begin with. All right then, let's go with your version. One question though: I don't see where you're changing _RWSTD_NEW_CAPACITY_RATIO to an integer. Are you? > __rw::__rw_new_capacity() uses floating point math > -------------------------------------------------- > > Key: STDCXX-226 > URL: https://issues.apache.org/jira/browse/STDCXX-226 > Project: C++ Standard Library > Issue Type: Improvement > Components: 23. Containers > Affects Versions: 4.1.2, 4.1.3, 4.2.0 > Environment: all > Reporter: Martin Sebor > Assignee: Farid Zaripov > Fix For: 4.2.1 > > Attachments: benchmark-stdcxx-226.c, new_capacity.patch > > > Moved from the Rogue Wave bug tracking database: > ****Created By: sebor @ May 09, 2002 11:15:41 AM**** > The template __rw_new_capacity() uses floating point arithmetic which may be less efficient than integer arithmetic on some architectures. Need to change to integer arithmetic and correctly handle integer overflow. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.