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

Doug Semler dougsemler@gmail.com
Wed Jun 9 13:52:00 GMT 2010


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?



More information about the Libstdc++ mailing list