Skip to content

[libc++] Use [[no_unique_address]] in place of __compressed_pair to reduce compile time and debug info size #93069

Closed
@rnk

Description

@rnk

As covered in crbug.com/338094922 , __compressed_pair is a major contributor to debug info size. Many libc++ classes use them to store allocators, default deleters, and other things. I believe that no_unique_address was intended to be layout-compatible with the __compressed_pair technique, but I'm not sure it actually is.

Regardless, for unstable ABI users, it would be a major QoI improvement to avoid extra compressed pair template instantiations.

I thought this feature request had already been filed, but I couldn't find it.

Related work:

Can we do this yet?

cc @zmodem @cjdb @amykhuang @zygoloid

Metadata

Metadata

Assignees

No one assigned

    Labels

    libc++libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.quality-of-implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions