About compiler memory consumption

H. S. Teoh hsteoh at quickfur.ath.cx
Wed Dec 4 08:25:11 PST 2013


On Wed, Dec 04, 2013 at 05:12:26PM +0100, bearophile wrote:
> Puming:
[...]
> >but a simple binary in vibe.d yields a ~12MB file,
> >it's somewhat slow to upload it.
> 
> There are programs to compress binaries a lot.

Take a look at UPX: http://upx.sourceforge.net/

In my own projects, a typical D program is easily 5-10MB, or, if it's
template-heavy, 15-20MB. But if I run 'strip' on the executable and then
run 'upx' on it, I can quite easily get it down to less than 1MB.

You won't be able to debug it, of course, since there would be no
symbols, etc., left, but if you're deploying it to your production
server anyway, presumably you've already debugged it beforehand, so this
shouldn't be a problem.


T

-- 
Claiming that your operating system is the best in the world because
more people use it is like saying McDonalds makes the best food in the
world. -- Carl B. Constantine


More information about the Digitalmars-d-learn mailing list