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 PATCH, RFC] Rewrite variant. Also PR libstdc++/85517


On Wed, 6 Feb 2019 at 12:21, Ville Voutilainen
<ville.voutilainen@gmail.com> wrote:
> > I think the assumption was this would produce smaller code. Does that
> > hold true?
>
> I think the assumption was that this produces equivalent or better
> code than fixing the current
> semantics bugs with some sort of separate constexpr arrays of function
> pointers would.
> And certainly better code than any approach that has a run-time
> branch. I don't think this ends up
> being different from the current codegen; both have an array indexing
> operation followed by an indirect
> function call.

And, to emphasize, the most important reason for this was to be able
to write straightforward
code for the special member functions, with the hope that it wouldn't
have a negative codegen
effect. Our Microsoft friends described the general technique as "has
crazy-good codegen",
but I have no idea what their starting point was; our starting point
probably wasn't bad
to begin with.


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