Currently, the rewrite rules in https://github.com/dsharlet/slinky/blob/main/builder/simplify_rules.h are written as templates that generate a lot of code.
At the cost of some performance, we could greatly reduce this code size impact by changing these rules to generate constexpr data instead of code, and change the matching engine to be an interpreter instead of generating code to implement the matching and rewrites.
Currently, the rewrite rules in https://github.com/dsharlet/slinky/blob/main/builder/simplify_rules.h are written as templates that generate a lot of code.
At the cost of some performance, we could greatly reduce this code size impact by changing these rules to generate
constexprdata instead of code, and change the matching engine to be an interpreter instead of generating code to implement the matching and rewrites.