It depends on your IDE, but generally debug build do not have many, if any, compiler optimizations enabled, and obviously they include debugging symbols in the exe, making it bigger. Release builds don't have debugging symbols, and use whatever compiler optimizations you chose.