mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:47:34 +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
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