mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-22 10:19:20 +00:00
LibJS+AK: Use Vector<u16, 1> for UTF-16 string storage
It's very common to encounter single-character strings in JavaScript on the web. We can make such strings significantly lighter by having a 1-character inline capacity on the Vectors.
This commit is contained in:
parent
ae0bdda86e
commit
024367d82e
Notes:
sideshowbarker
2024-07-18 03:12:34 +09:00
Author: https://github.com/awesomekling
Commit: 024367d82e
7 changed files with 27 additions and 26 deletions
|
@ -16,10 +16,10 @@
|
|||
|
||||
namespace AK {
|
||||
|
||||
Vector<u16> utf8_to_utf16(StringView const&);
|
||||
Vector<u16> utf8_to_utf16(Utf8View const&);
|
||||
Vector<u16> utf32_to_utf16(Utf32View const&);
|
||||
void code_point_to_utf16(Vector<u16>&, u32);
|
||||
Vector<u16, 1> utf8_to_utf16(StringView const&);
|
||||
Vector<u16, 1> utf8_to_utf16(Utf8View const&);
|
||||
Vector<u16, 1> utf32_to_utf16(Utf32View const&);
|
||||
void code_point_to_utf16(Vector<u16, 1>&, u32);
|
||||
|
||||
class Utf16View;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue