Re: [PATCH 1/2] libstdc++: Optimize _Utf_iterator for size

2025-07-17 Thread Tomasz Kaminski
On Thu, Jul 17, 2025 at 7:03 PM Jonathan Wakely wrote: > This reorders the data members of _Utf_iterator to avoid padding bytes > between members due to alignment requirements. For x86_64 the previous > layout had padding after _M_buf and after _M_to_increment for the common > case where the iter

[PATCH 1/2] libstdc++: Optimize _Utf_iterator for size

2025-07-17 Thread Jonathan Wakely
This reorders the data members of _Utf_iterator to avoid padding bytes between members due to alignment requirements. For x86_64 the previous layout had padding after _M_buf and after _M_to_increment for the common case where the iterators and sentinel types are pointers, so the size shrinks from 4