Just thought I would follow up here. Since my ultimate goal was faster builds, 
I ultimately found that the biggest end-to-end improvements were to simply 
reduce the amount of code being generated. It’s a bit of a “no kidding” 
realization, but also a bit opaque at the same time.

For example, this set of changes reduce my generated code size by about 60% on 
one of my projects:

<https://github.com/NecsusECS/Necsus/compare/c4ade2f879e428d1408f7e04a6ba403a9fead8cf...a41fc608efa5972ad4908e9f598d58e6a17f2113>

With that, compile times (on my laptop) were reduced by more than 35%.

My strategy was pretty simple — dump the size of the generated files in the Nim 
cache directory, then fiddle with the generated code to see if I could shrink 
it. 

Reply via email to