ladybird/Meta/Lagom/Tools/CodeGenerators
Timothy Flynn 0652cc48c0 LibUnicode: Perform code point property lookups in constant time
We currently produce a single table for all categories of code point
properties (GeneralCategory, Script, etc.). Each row contains a field
indicating the range of code points to which that property applies. At
runtime, we then do a binary search through that table to decide if a
code point has a property.

This changes our approach to generate a 2-stage lookup table for each of
those categories. There is an in-depth explanation of these tables above
the new `create_code_point_tables` method. The end effect is that code
point property lookup is reduced from a binary search to constant-time
array lookups.

In total, this change:

    * Increases the size of libunicode.so from 2.7 MB to 2.9 MB.

    * Reduces the runtime of the new benchmark test case added here from
      3.576s to 1.020s (a 3.5x speedup).

    * In a profile of resizing a TextEditor window with a 3MB file open,
      the runtime of checking if a code point has a word break property
      reduces from ~81% to ~56%.
2023-07-26 08:36:20 +02:00
..
IPCCompiler IPCCompiler: Add option to pass output file path 2023-07-07 06:41:51 -04:00
LibEDID LibEDID: Ignore duplicate PNP IDs 2023-06-08 13:03:14 +02:00
LibGL AK: Propagate errors from SourceGenerator::fork() 2023-06-17 17:48:06 +01:00
LibLocale LibLocale: Avoid unnecessary HashMap copy 2023-05-19 22:33:57 +02:00
LibTimeZone LibTimeZone+Userland: Change timezone functions to use UnixDateTime 2023-05-24 23:18:07 +02:00
LibUnicode LibUnicode: Perform code point property lookups in constant time 2023-07-26 08:36:20 +02:00
LibWeb LibJS+LibWeb: Move IteratorOperations.h AOs to Iterator.h 2023-07-19 14:11:43 +01:00
StateMachineGenerator AK: Propagate errors from SourceGenerator::fork() 2023-06-17 17:48:06 +01:00
CMakeLists.txt LibGL: Generate the API wrappers 2022-12-20 10:42:31 +01:00