• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

No wonder all MS programs are HUGE.

Zorba

Lifer
I just wrote a ~100 line program (Source is about 2K (including a my personal header file). I compiled this program first with Mingw, and it was a total of 3.8KB. I then tried it with MS VC++ 4.0 and it came out 110KB (along with 500KB of crap files). After seeing this I decided to compile it with MS VC++ 6.0, the program came to a grand total of 180KB (along with 800KB of other files).

This made me wonder, so I recompiled a file that I wrote in VC++ 4.0 about a year ago. This program has ~1200 lines (give or take 100). With VC++ 4.0 it was 200KB (I didn't think that was to bad at the time). After my last test I decided to try this on the other two. VC++ 6.0's version was a HUGE 350KB. Mingw's version, though, was only 21KB!!!

Conclusion: All MS programs will be HUGE until they learn how to write a good compiler. What sucks in all of this, is I like VC++ 4.0's Editor the best, but I will not be able to stand knowing my files could be 10% the size using Mingw with Dev-C++.

 
Yep, it's pretty shocking actually. Back in the early 80's my Timex Sinclair 1000 had 2K memory. It had several impressive games including a decent flight simulator. All coded within 2K! Now you declare any variable and you consume at least that. Pretty nuts, eh?
 
MS Visual C++ is probably the best x86/Windows compiler in existance. Most commercial programmers use it (Carmack did Q3 with it) and it is also a really good IDE.

As for your problems:

Optimise your code for size, not for speed (compilation options). Speed optimisations make the program bigger.

Avoid including libraries and other people's code if you can accomplish the same thing with just a few small lines of your own code.
 
It's the Windows mentality that let this thing get out of hand. As soon as it became acceptable to ship 100M word processors it was all over. I am amazed at the stuff people are doing on the Palm platform. Programs that would be HUGE under Windows are only a few kilobytes on the Palm platform. Now that's coding for ya.
 
Are you compiling with debugging enabled? That massively increases the size of the finished product.

My latest program that I've been tinkering with, has about 3000 lines, and has a moderately sophisticated GUI and file structure. VC++ 6.0 results in an 80 kB executable - admittedly still bloated, but acceptable.

The debug executable on the other hand is close to 300 kB.
 
Flight simulator in 2k?? Don't believe it was more than arcade stuff. Did this machine have rubber keys or a touch pad? (spectrum/ zx80/1)
 
Back
Top