I’m not really sure if that’s a correct title/term but I have a project in Zig and I’m using a lot of meta-programming there, and I’m worried about some helpers get compiled again and again and if I could maybe refactor some of those into different patterns.
So what I’m worried about is what functions occupy the most space, so I can then have a look and maybe rethink those parts again. All I know is that the binary size went up considerably (13M) but it might be for a lot of okish reasons (bundled sqlite, httpz, libc, etc.)
Also, I think I saw some zig tool to measure that but I cannot find it anymore.
Simple things should be caught and deduplicated by LLVM.
Can you provide examples of what you think might cause problems?
Regardless, reducing monomorphisation is good for faster compile times and smaller binaries
It could go either way for performance, benchmark if you care about that.