This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [v3] libstdc++/44413 (for ext/vstring)


On Wed, Jun 9, 2010 at 5:22 AM, Paolo Carlini <paolo.carlini@oracle.com> wrote:
> Hi,
>
> let's do this for ext/vstring first, and let's see how people react. I'm
> still reluctant to do it for basic_string, given that the compare
> functions are exported and legacy apps are at risk of behaving
> differently all of a sudden. Committed to mainline.
>

I don't see it.  You're really hurting the 32 bit side with this.  The
original is reduced to a subtraction, while the new code adds:

        xorl    %eax, %eax
        cmpl    $0, %edx
        je      .L3
        setg    %al
        movzbl  %al, %eax
        leal    -1(%eax,%eax), %eax
.L3
        ret

In addition, it seems that the attempt only reduces the code by one move?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]