diff options
| author | Theresa Foley <10618364+tangent-vector@users.noreply.github.com> | 2025-04-16 12:28:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-04-16 12:28:39 -0700 |
| commit | 2b20e9e150225f8cb75f7be2061f5ec99cbb2f66 (patch) | |
| tree | 1ff5065b73021176f9a0dcb10273c2f372feac28 /source/slang/slang-parser.cpp | |
| parent | 786f456c2558f07c5a396e25ecb635a3c5480313 (diff) | |
Remove support for ad hoc Slang IR compression (#6834)
* Remove support for ad hoc Slang IR compression
This change is part of a larger effort to clean up the approach to
serialization in the Slang compiler. The overall goal is to simplify
and streamline all of the serialization-related logic, so that we are
left with code that is less "clever," and easier to understand for
contributors to the codebase.
Removing support for compression of serialized Slang IR has
benefits that include:
* Reduction in code complexity: consider things like the subtle way
that the `FOURCC`s for compressed chunks were being computed from
the uncompressed versions, and the mental overhead that goes into
understanding that, for anybody who would dare to touch this code.
* Reduction in testing burden: there have been, de facto, two
very different code paths for serialization of the Slang IR, and
it is not clear that the existing test corpus for Slang has
sufficient coverage for both options. By having only a single code
path, every test that performs any amount of IR serialization helps
with test coverage of that one path.
* Opportunity to explore alternatives. This is perhaps a reiteration
of the first point, but once the code is stripped down to the
simplest thing that could possibly work (I am not claiming it has
reached that point yet), it becomes easier for contributors to
understand, and it becomes more tractable for somebody to come along
with an improved approach that performs better (in either
compression ratio or performance) while still being maintainable.
In my own local setup, I found that removing support for Slang IR
compression led to the `slang-core-module-generated.h` file increasing
in size from 46.1MB to 47.4MB. This increase in the `.h` file size
for the core library binary only resulted in a release build of
`slang.dll` increasing from 20.0MB to 20.2MB. Removing the ad hoc
compression support has almost no impact on the size of actual binary
Slang modules *so long* as the additional LZ4 compression step is
being applied to them.
* format code
---------
Co-authored-by: slangbot <186143334+slangbot@users.noreply.github.com>
Diffstat (limited to 'source/slang/slang-parser.cpp')
0 files changed, 0 insertions, 0 deletions
