Compiler: Size of generated executable file

Ph romanua at gmail.com
Sat Jan 9 07:36:44 PST 2010


Why a generated file is so huge?
"Empty" program such as:

int main(char[][] args)
{

	return 0;
}

compiled with dmd2 into file with size of  266268 bytes.
Even after UPX, it's size is 87552 bytes.
Size of this code,compiled with VS(yes,yes, C++), is 6 656 bytes.
Compiler add's standard library  to file, am i right?
Is there some optimization which delete unused code from file?




More information about the Digitalmars-d mailing list