Open eternal-flame-AD opened 4 hours ago
You can use .boxed()
to switch to dynamic dispatch, which avoids large types. See here. Note that this doesn't always come with a performance hit: LLVM is often able to devirtualise the parsers and still statically knit them together. Sometimes, performance can even improve!
I only boxed expressions, statements and primitives like ifs, I will try boxing them all tomorrow and report back. Thanks
Would appreciate some advice! I read the advice section in the docs and used boxing in each function and used choice for any >=3 or's. My compile time was okay (~10 seconds on an LTO'ed build, excl. dependencies) but I get giant symbol names which feels wasteful, for example this 29 byte function get a 30kb+ name, is the only option here stripping the binary?
Some naive grepping give me this histogram, I attached the full name of the longest symbol. symbol.txt
Example of my code: