At 07:54 2007-01-30, chetan verma wrote:

Nuno Berneaud <[EMAIL PROTECTED]> wrote:
Hello.

On 29 Jan 2007, you wrote:

> BTW, found this in Bjarne's C++ FAQ:
> Why is the code generated for the "Hello world" program ten times
> larger for C++ than for C?
> It isn't on my machine, and it shouldn't be on yours. I have even
> seen the C++ version of the "hello world" program smaller than the C
> version. When I recently (2004) tested using gcc -o2 on a Unix, the
> two versions (iostreams and stdio) yielded identical sizes. There is
> no language reason why the one version should be larger than the
> other. It is all an issue on how the implementor organized the
> libraries. If one version is significantly larger than the other,
> report the problem to the implementor of the larger.

I've tried the Bjarne's "hello world" example, too, and was surprised to see the
executable was almost 4MB! 5 lines of code, a couple includes, isn't it a bit
too much?

Bye,

Nuno
,_._,___
;


It is too much.
On my compiler (mingw) i got 464 KB executable for the <iostream> version and 15.2 KB for the <cstdio> and <stdio.h> versions.

are you SURE you used the -o2 option?
if so, then the folks working on g++ have forgotten how to build a library


-chetan.


No need to miss a message. <http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail>Get email on-the-go with Yahoo! Mail for Mobile. <http://us.rd.yahoo.com/evt=43910/*http://mobile.yahoo.com/mail>Get started.

Victor A. Wagner Jr.      http://rudbek.com
The five most dangerous words in the English language:
              "There oughta be a law" 

Reply via email to