On 2007-02-14, Grant Edwards <[email protected]> wrote:

> It's not as bad as it initially looked for this case.  There's
> still some unexplained frame size overhead though.  I can take
> a function like this which has a frame size of 32:
>
> void foo()
>  {
>  line1;
>  line2;
>  line3;
>  line4;
>  line5;
>  line6;
>  line7;
>  line8;
>  }
>
> And split it up into two functions each of which will have a
> frame size of 28:
>
> void foo1()
>  {
>  line1;
>  line2;
>  line3;
>  line4;
>  }
>
> void foo2()
>  {
>  line5;
>  line6;
>  line7;
>  line8;
>  }

Sometimes the difference is even a bit larger: as a single
function a frame size of 22, whem split, both have a framesize
of 16.

> I don't suppose there's an "optimize for frame size" option?

The -O setting does seem to make a difference. -O1 seems to
produce the smallest frame sizes with -Os in second place.  -O3
is the worst.  No big surprise there.

-- 
Grant Edwards                   grante             Yow!  There's enough money
                                  at               here to buy 5000 cans of
                               visi.com            Noodle-Roni!


Reply via email to