Re: About Visual C++ 2005 Express Edition
- From: jacob navia <jacob@xxxxxxxxxxxxxxxx>
- Date: Tue, 03 Oct 2006 14:19:12 +0200
Keith Thompson wrote:
jacob navia <jacob@xxxxxxxxxxxxxxxx> writes:
Richard Heathfield wrote:
[...]
Here's a small source file, which should show up the overhead of
various compilers quite well:
#include <stdio.h>
int main(void)
{
puts("Hello world");
return 0;
}
Here are the executable image sizes, in bytes (implementations with
"C++" in their title were invoked in C mode!):
gcc 2.81 for DOS: 92403
Visual C++ 5.0: 81408
Borland C++ 5.3: 55296
Borland C++ 5.6: 50688
Visual C++ 2005 Express Edition: 40960
gcc 2.95.3 for Linux: 34686
Visual C++ 6.0: 28672
Visual C++ 1.5: 5699
Turbo C++ 1.01: 4760
I tried to download lcc-win32 for comparison purposes, but the main
site's download link was bad, and the backup site screamed "bad
gateway" at me, so I guess that comparison will have to wait for
some other day.
Yes, virginia.edu is down
My data point is
lcc-win32 3104 bytes
compilation options
lc -O thello.c -s
But a more realistic example is:
#include <stdio.h>
int main(void)
{
printf("Hello world");
return 0;
}
This produces a code of 42 283 bytes (statically linked libc)
With dynamically linked libc we go down to 8152 bytes.
But that's not a useful comparison unless you have sizes for *the same
program* for other compilers.
Heathfield's sample used puts. Puts is MUCH smaller than printf OF COURSE.
I just showed a more realistical example. Even with all printf, 8K
is very good in Heathfield's list. Using puts() I am the smallest.
The code of printf is very bulky since needs an extended precision
library to correctly print denormal floating point numbers with all
the required precision. This is one of the few printfs that gets it
right, together with gcc's printf.
gcc has no printf; gcc is a compiler, not a complete implementation.
It uses whatever runtime library is provided by the operating system.
Do you mean glibc's printf?
Obvious. Technically you are right, it's glibc's printf
.
- Follow-Ups:
- Re: About Visual C++ 2005 Express Edition
- From: Richard Heathfield
- Re: About Visual C++ 2005 Express Edition
- References:
- About Visual C++ 2005 Express Edition
- From: mistral
- Re: About Visual C++ 2005 Express Edition
- From: Richard Heathfield
- Re: About Visual C++ 2005 Express Edition
- From: jacob navia
- Re: About Visual C++ 2005 Express Edition
- From: Keith Thompson
- About Visual C++ 2005 Express Edition
- Prev by Date: Re: About Visual C++ 2005 Express Edition
- Next by Date: Re: About Visual C++ 2005 Express Edition
- Previous by thread: Re: About Visual C++ 2005 Express Edition
- Next by thread: Re: About Visual C++ 2005 Express Edition
- Index(es):
Relevant Pages
|