mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 23:56:06 +00:00
AK: Use simdutf
when appending UTF-16 to StringBuilder
Adds a fast path for valid UTF-16 using `simdutf`, and fall back to the slow path for unmatched surrogates.
This commit is contained in:
parent
ff6020c207
commit
04920d06f0
Notes:
github-actions[bot]
2024-10-30 09:29:15 +00:00
Author: https://github.com/yyny
Commit: 04920d06f0
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1973
4 changed files with 120 additions and 17 deletions
|
@ -109,6 +109,8 @@ public:
|
|||
u16 const* data() const { return m_code_units.data(); }
|
||||
char16_t const* char_data() const { return reinterpret_cast<char16_t const*>(data()); }
|
||||
|
||||
ReadonlySpan<u16> span() const { return m_code_units; }
|
||||
|
||||
u16 code_unit_at(size_t index) const;
|
||||
u32 code_point_at(size_t index) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue