This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: std::map and std::set based on AVL, not RB trees.
On Thu, Mar 31, 2005 at 04:39:34PM +0200, Paolo Carlini wrote:
> Jonathan Wakely wrote:
>
> >I don't think anything strange is going on, I just wonder if it would be
> >better if we implemented the proposed resolution (as Dinkum already
> >does) because
> >
> >
> But I have to remind you that, as a policy we do **not** implement
> resolutions in the "Open" status.
Yes, I realise that. OK, so forget my reason (1), I still think it would
be a nice QOI feature, for reasons given in (2).
> What if the final resolution is different?
What if it's not? ;)
GCC 4.0 will cause performance regressions for any code which assumes the
old meaning of the hint, irrespective of the final resolution.
Presumably anyone using the hints is doing so after testing that it
makes their code faster. That will no longer be true for 4.0, so they
will have to change their code or suffer a performance hit.
Where behaviour changes in other parts of the compiler there is usually
a deprecation period, where the old behaviour can still be used. I
think it would be nice if we could support the old behaviour *and* the
standard one. If the proposed resolution is accepted, we already
implement it. If it isn't accepted we could drop the old behaviour,
having provided a smoother transition to the new form by supporting both
and documenting that the old one will stop working.
> >2) we would still support code written to the old meaning of the hint.
> > The traditional meaning, used by the HP and SGI implementations, was
> > that insertion before the hint is constant. There could be lots of code
> > written using that guarantee. Our docs still describe that behaviour.
> >
> >
> Then the docs must be fixed.
Yes, I guess so. I started fixing them and that prompted my question.
Personally, I think the standard behaviour is silly, but I'll prepare
a docs patch to match it.
This should be added to a list of changes for 4.0 so people using the
hints know to change their code.
jon