Date: Tue, 20 Dec 2022 11:26:34 +0100
Il 20/12/22 09:56, Edward Catmur ha scritto:
> > Also, which current potential ABI break are you referring to?
>
> The ideas of passing a `unique_ptr` by value in a register, just like a
> raw pointer, because ... it is a raw pointer. Basically,
> [[trivial_abi]] for it / changing the calling convention.
>
>
> But that's clang-only, right? Even libc++ wants to support multiple
> compilers.
What stops other compilers from doing the same? I just pointed it out
that that's a case where that you can have performance benefits today by
breaking ABI (I think Google measured single-digit % improvements by
just flipping this), and yet, it's an opt-in, not an opt-out.
My 2 c,
> > Also, which current potential ABI break are you referring to?
>
> The ideas of passing a `unique_ptr` by value in a register, just like a
> raw pointer, because ... it is a raw pointer. Basically,
> [[trivial_abi]] for it / changing the calling convention.
>
>
> But that's clang-only, right? Even libc++ wants to support multiple
> compilers.
What stops other compilers from doing the same? I just pointed it out
that that's a case where that you can have performance benefits today by
breaking ABI (I think Google measured single-digit % improvements by
just flipping this), and yet, it's an opt-in, not an opt-out.
My 2 c,
-- Giuseppe D'Angelo
Received on 2022-12-20 10:26:38