ladybird/Meta/Lagom/Tools/CodeGenerators/LibUnicode
Timothy Flynn 3ad159537e LibUnicode: Use u16 for unique string indices instead of size_t
Typically size_t is used for indices, but we can take advantage of the
knowledge that there is approximately only 46K unique strings in the
generated UnicodeLocale.cpp file. Therefore, we can get away with using
u16 to store indices. There is a VERIFY that will fail if we ever exceed
the limits of u16.

On x86_64 builds, this reduces libunicode.so from 9.2 MiB to 7.3 MiB.
On i686 builds, this reduces libunicode.so from 3.9 MiB to 3.3 MiB.

These savings are entirely in the .rodata section of the shared library.
2021-10-15 00:06:18 +01:00
..
CMakeLists.txt Meta: Define and use lagom_tool() CMake helper function for all Tools 2021-09-15 19:04:52 +04:30
GenerateUnicodeData.cpp LibUnicode: Generate enum/alias from-string methods without a HashMap 2021-10-13 16:38:51 +02:00
GenerateUnicodeLocale.cpp LibUnicode: Use u16 for unique string indices instead of size_t 2021-10-15 00:06:18 +01:00
GeneratorUtil.h LibUnicode: Generate enum/alias from-string methods without a HashMap 2021-10-13 16:38:51 +02:00