This PR removes the compression during codegen and instead writes out zig files that can be imported in src, so that the initializing of all modules is now (with one exception) just setting pointers to point into constant data space. Additionally, a few modules required 0x11000 length arrays, and have now been changed to two-tier data structures (using something like 65-75 kB instead of ~4-8 MB).
This PR keeps the same(*) API, so that anyone wanting these performance gains doesn't need breaking changes. That said, I'll be PR'ing a change to the API separately (after a few of these PRs are merged, since the changes are stacked on top of them, on my branch), as now all methods can just use constant data instead of runtime data.
Note that I tested this change in a real world application, and compression was only saving 16 bytes in total for 3 modules.
*: CompatData.toNfkd now returns []const u21 instead of []u21
This PR removes the compression during codegen and instead writes out zig files that can be imported in `src`, so that the initializing of all modules is now (with one exception) just setting pointers to point into constant data space. Additionally, a few modules required 0x11000 length arrays, and have now been changed to two-tier data structures (using something like 65-75 kB instead of ~4-8 MB).
This PR keeps the same(*) API, so that anyone wanting these performance gains doesn't need breaking changes. That said, I'll be PR'ing a change to the API separately (after a few of these PRs are merged, since the changes are stacked on top of them, [on my branch](https://codeberg.org/jacobsandlund/zg/src/branch/jacob)), as now all methods can just use constant data instead of runtime data.
Note that I tested this change in a real world application, and compression was only saving 16 bytes in total for 3 modules.
*: `CompatData.toNfkd` now returns `[]const u21` instead of `[]u21`