![]() 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. |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
GenerateUnicodeData.cpp | ||
GenerateUnicodeLocale.cpp | ||
GeneratorUtil.h |