A "Hello world" program compiled in different compilers:
Makes you dizzy, right? :eek: :cool:Code:MS Visual C++ - 225348 bytes
Borland C++ - 75870 bytes
Nasm - 36 bytes
Printable View
A "Hello world" program compiled in different compilers:
Makes you dizzy, right? :eek: :cool:Code:MS Visual C++ - 225348 bytes
Borland C++ - 75870 bytes
Nasm - 36 bytes
Not really....NASM isn't exactly a C/C++ compiler, so it's not exactly comparable...
//edit: And which versions of the two C/C++ compilers? Standard and Enterprise of VC++ would give quite diffferent results with different optimizations on...
//edit2: Also, Debug or Release MSVC++?
Sure, on default settings...
Was that debug build by any chance?
MSVC++6 Enterprise, Release, with Optimizations on Minimize Size: 64.0 KB (65,536 bytes)
:: Buzzes buzzer ::
This post stinks...
Oh god, has someone forgotten to change -KEN- again?Quote:
Originally posted by BMJ
:: Buzzes buzzer ::
This post stinks...
::sniffsniff:: - nope, I'm so fresh and so clean...
Il add one
Code:
MS Visual C++ .NET - 462848 bytes
MS Visual C++ 6.0 Enterprise - 225348 bytes
Borland C++ - 75870 bytes
Nasm - 36 bytes
MS Visual C++ .NET - 2,048 bytes
It's possible to get lower (at least around 1kb); but I can't be bothered.
Code:Compiler - Size / bytes
MS Visual C++ .NET - 462848
Mingw - 448537
MS Visual C++ 6.0 Enterprise - 225348
Borland C++ - 75870
Nasm - 36
MS-DOS Debug - 25
Wow, pretty neat.
I dont think the size of the program will really matter until it gets fairly large, or if you have to have it as small as possible for smaller computer devices like watches, robots etc.
I know this is comparing apples to oranges but my Python 'Hello World' program is 21 bytes :)
Reason that .NET is really at it with .EXE size is because if
it's huge framework, It includes alot of things you wouldnt
use anyway. At least that's the case with me, I saw that you
can change that.
The .NET compiler can compile managed or unmanaged C++ code.Quote:
Originally posted by Travis Dane
Reason that .NET is really at it with .EXE size is because if
it's huge framework, It includes alot of things you wouldnt
use anyway. At least that's the case with me, I saw that you
can change that.
>Reason that .NET is really at it with .EXE size is because if
it's huge framework,<
If by this you mean the net framework; then the default size of the actual exe is smaller for the managed code than the unmanaged. So it is not due to this large framework. It is due to the amount of the C runtime library that is linked in with the exe.
Also, it all depends on what enviroment the programs are running in, as the size of the smaller executables running in win32 will have as much meaning as damonbrinkleys python program. The size of the exe/com/whatever will probably pale into insignificance compared with the amount of extra code used by the o/s to carry out the program (either in dlls or because it's using the VDM).
I know that, And thank god.Quote:
Originally posted by Eibro
The .NET compiler can compile managed or unmanaged C++ code.
Yes, But i'm using the same headers supplied with MSVC++ 6, SoQuote:
Also, it all depends on what enviroment the programs are running in, as the size of the smaller executables running in win32 will have as much meaning as damonbrinkleys python program. The size of the exe/com/whatever will probably pale into insignificance compared with the amount of extra code used by the o/s to carry out the program (either in dlls or because it's using the VDM).
what's with the big file size?
Codewarrior - 27,136
QBasic - 18,608 :D
The libraries that are linked (and the versions linked to ie debug is bigger)
My non MFC app written in MSVC v6 in C for WIN32 is 400K release and 1200K debug.
It is around 40,000 lines of code (not counting libraries and standard headers). It is a sort of a fully featured browser (just for a special site).