Hunting for performance regressions in libstdc++

Paolo Carlini pcarlini@suse.de
Fri Jun 17 15:29:00 GMT 2005


Howard Hinnant wrote:

>> By the way, a slightly pedantic remark even if correct, admittedly:
>> wouldn't be more correct in the pseudocode '<' instead of '<=', and
>> likewise '>' instead of '>='?
>
> Your comment is a little ambiguous as there are multiple pseudocode
> listings.  Did you mean all of them?  I've briefly glanced at all of
> them containing "<=" or ">=" and don't immediately see any errors. 
> However, I'm happy to look at a specific pseudocode listing in more
> detail.  I've certainly made errors before and I'm sure will again.

Actually I meant the pseudocodes in frames, sorry. Assuming the operator
in the pseudocode has the same meaning of the comparison operator that
the containers take, would be more correctly '<', for std::less, then
'>', when appropriate. For instance, the first one, case ignore hint if
wrong (suppose, for clarity of explanation on my part that p != begin &&
p != end) would be:

    if (x < *p && x > *(p - 1))
       insert x before p
    else
       insert x without hint

Paolo.



More information about the Libstdc++ mailing list