[ 
https://issues.apache.org/jira/browse/STDCXX-226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Martin Sebor updated STDCXX-226:
--------------------------------

    Attachment: benchmark-stdcxx-226.c

Attached simple benchmark program to compare the runtime performance of the 
three approaches discussed in the issue. Compiled with any C compiler, run as 
follows:

  $ time ./a.out [ 0 | 1 | 2 ] N

0 for the original algorithm
1 for the algorithm implemented in the attached patch
2 for the reciprocal multiplication approach

N the number of iterations (unsigned long)


> __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.

Reply via email to