mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00: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
dfade03777
commit
9599742fea
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue