summaryrefslogtreecommitdiff
path: root/AK/OwnPtr.h
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-08-10 07:17:24 -0400
committerAndreas Kling <kling@serenityos.org>2021-08-11 13:11:01 +0200
commit7dce2bfe233de92a8efd0c12bc746adddbb557a0 (patch)
tree325bab8265714a30358c10a87673f8f07c38f2ae /AK/OwnPtr.h
parent4e546cee97df984f5327922c312520e36c1d9688 (diff)
downloadserenity-7dce2bfe233de92a8efd0c12bc746adddbb557a0.zip
LibUnicode: Generate separate tables for General Category properties
Previously, each code point's General Category was part of the generated UnicodeData structure. This ultimately presented two problems, one functional and one performance related: * Some General Categories are applied to unassigned code points, for example the Unassigned (Cn) category. Unassigned code points are strictly excluded from UnicodeData.txt, so by relying on that file, the generator is unable to handle these categories. * Lookups for General Categories are slower when searching through the large UnicodeData hash map. Even though lookups are O(1), the hash function turned out to be slower than binary searching through a category-specific table. So, now a table is generated for each General Category. When querying a code point for a category, a binary search is done on each code point range in that category's table to check if code point has that category. Further, General Categories are now parsed from the UCD file DerivedGeneralCategory.txt. This file is a normal "prop list" file and contains the categories for unassigned code points.
Diffstat (limited to 'AK/OwnPtr.h')
0 files changed, 0 insertions, 0 deletions