stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <>
Subject [jira] Commented: (STDCXX-226) __rw::__rw_new_capacity() uses floating point math
Date Thu, 13 Dec 2007 01:34:44 GMT


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

View raw message