mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 01:59:31 +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
697e87b7bd
commit
b2779ad9f7
Notes:
github-actions[bot]
2025-04-09 05:23:14 +00:00
Author: https://github.com/awesomekling
Commit: b2779ad9f7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4289
Reviewed-by: https://github.com/Hendiadyoin1
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
Add a link
Reference in a new issue