[PATCH] sso-string@gnu-versioned-namespace [PR83077]
François Dumont
frs.dumont@gmail.com
Mon Nov 18 06:08:18 GMT 2024
Note that this change is now also available as a PR:
https://forge.sourceware.org/gcc/gcc-TEST/pulls/17
On 28/02/2024 19:37, François Dumont wrote:
> Another version with the major enhancement that COW string is not
> explicitly instantiated anymore. That's ~100ko saved in resulting lib,
> not too bad.
>
> Note that this patch is also smaller cause I removed the regenerated
> parts from it. We got time but can you confirmed that when approved
> I'll also have to commit the regenerated files ?
>
> François
>
>
> On 17/08/2023 19:22, Jonathan Wakely wrote:
>> On Sun, 13 Aug 2023 at 14:27, François Dumont via Libstdc++
>> <libstdc++@gcc.gnu.org> wrote:
>>> Here is the fixed patch tested in all 3 modes:
>>>
>>> - _GLIBCXX_USE_DUAL_ABI
>>>
>>> - !_GLIBCXX_USE_DUAL_ABI && !_GLIBCXX_USE_CXX11_ABI
>>>
>>> - !_GLIBCXX_USE_DUAL_ABI && _GLIBCXX_USE_CXX11_ABI
>>>
>>> I don't know what you have in mind for the change below but I wanted to
>>> let you know that I tried to put COW std::basic_string into a nested
>>> __cow namespace when _GLIBCXX_USE_CXX11_ABI. But it had more impact on
>>> string-inst.cc so I preferred the macro substitution approach.
>> I was thinking of implementing the necessary special members functions
>> of __cow_string directly, so they are ABI compatible with the COW
>> std::basic_string but don't actually reuse the code. That would mean
>> we don't need to compile and instantiate the whole COW string just to
>> use a few members from it. But that can be done later, the macro
>> approach seems OK for now.
>>
>>> There are some test failing when !_GLIBCXX_USE_CXX11_ABI that are
>>> unrelated with my changes. I'll propose fixes in coming days.
>> Which tests? I run the entire testsuite with
>> -D_GLIBCXX_USE_CXX11_ABI=0 several times per day and I'm not seeing
>> failures.
>>
>> I'll review the patch ASAP, thanks for working on it.
>>
More information about the Libstdc++
mailing list