The main goal here was to reduce the module size to the point where a DEX module could be shared around as if it was a normal C# library, uploaded to sbox.game, etc. Essentially that means we need to uglify the compiled DEX code even further, getting rid of newlines and other pretty printing stuff, and consolidating variable names so that they take as few characters as possible. That includes function names too, everything that isn't publicly exposed.
There aren't any fantastic C# minifiers out there, because there hasn't really been a need for them yet. The only actively maintained minifier doesn't rename anything, it just kills whitespace, so I had to modify DExTr to support minification out of the box.
Lucky for me, it's really easy to determine how many times a value is used in LLVM, so we can be pretty smart about how variable names are chosen (assigning the shortest minified names to the most-used variables and functions).The initial embedded memory is also compressed as a base64 string in order to squeeze as much as we can in.
But anyway, with minification enabled now the module is just one massive line of code, and it halved the module size from 8MB down to 4MB. When compressed it's just over 800KB. There's still some dead whitespace here and there but I'll be tightening that up over time.