mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:28:12 +00:00
LibUnicode: Generate locale subtag data as multiple smaller tables
This commit is preemptive to upcoming commits which add more subtags to the CLDR generator. Rather than generating a giant HashMap containing all data, generate more (smaller) Array-based tables. This mimics the UCD generator. This also allows simpler lookups at runtime since we can generate index-based lookups into the smaller tables rather easily. Without this change, adding the remaining locale subtags would result in the generation and compilation of UnicodeLocale.cpp taking about 30s on my machine. With this change, it takes about half that. Additionally, the size of the generated file reduces by about 1.5MB.
This commit is contained in:
parent
b8ad4d302e
commit
6719e5cb17
4 changed files with 91 additions and 69 deletions
|
@ -19,7 +19,6 @@ enum class Script : u8;
|
|||
enum class Territory : u8;
|
||||
enum class WordBreakProperty : u8;
|
||||
|
||||
struct LocaleData;
|
||||
struct SpecialCasing;
|
||||
struct UnicodeData;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue