Return-Path: Delivered-To: apmail-incubator-stdcxx-dev-archive@www.apache.org Received: (qmail 36415 invoked from network); 19 Nov 2007 15:07:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Nov 2007 15:07:06 -0000 Received: (qmail 99177 invoked by uid 500); 19 Nov 2007 15:06:54 -0000 Delivered-To: apmail-incubator-stdcxx-dev-archive@incubator.apache.org Received: (qmail 99118 invoked by uid 500); 19 Nov 2007 15:06:53 -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 99107 invoked by uid 99); 19 Nov 2007 15:06:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Nov 2007 07:06:53 -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; Mon, 19 Nov 2007 15:06:50 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id EF61771422B for ; Mon, 19 Nov 2007 07:06:43 -0800 (PST) Message-ID: <30860890.1195484803938.JavaMail.jira@brutus> Date: Mon, 19 Nov 2007 07:06:43 -0800 (PST) From: "Farid Zaripov (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_12543588 ] Farid Zaripov commented on STDCXX-226: -------------------------------------- We can replace _RWSTD_RATIO_DIVIDER == 1000 to 1024 and then replace division to shift. I've attached the second patch. > __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 > Environment: all > Reporter: Martin Sebor > Assignee: Farid Zaripov > Attachments: 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.