The machine code can be so big because people put huge strings as constants. As I mentioned cutting down binary size comes from working on the code and understand how the complier translate it into machine codes. The compiler could unravel a loop, inline functions, etc... The compiler is making decisions about binary size vs speed for you. There are ways to tell it not to do that.