mirror of
https://github.com/zebrajr/ladybird.git
synced 2025-12-06 00:19:53 +01:00
AK: Shrink Utf16View from 40 bytes to 32 bytes
This ends up making RegexStringView smaller, which means less stuff to copy when forking in the regex engine. Thanks to Leon for suggesting the [[no_unique_address]] trick!
This commit is contained in:
parent
697e87b7bd
commit
b2779ad9f7
|
|
@ -138,7 +138,7 @@ private:
|
|||
size_t calculate_length_in_code_points() const;
|
||||
|
||||
ReadonlySpan<u16> m_code_units;
|
||||
mutable Optional<size_t> m_length_in_code_points;
|
||||
[[no_unique_address]] mutable Optional<size_t> m_length_in_code_points;
|
||||
Endianness m_endianness { Endianness::Host };
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user