lkml.org 
[lkml]   [2007]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: -Os versus -O2
Date
>> -Os is "as fast as you can without bloating the code size",
>> so that is the expected result for CPUs that don't need
>> special hand-holding around certain performance pitfalls.
>
> this sounds like you are saying that people wanting performance should
> pick -Os.

That is true on most CPUs. Some CPUs really really need
some of things that -Os disables (compared to -O2) for
decent performance though (branch target alignment...)

> what should people pick who care more about code size then anything
> else? (examples being embedded development where you may be willing to
> sacrafice speed to avoid having to add additional chips to the design)

-Os and tune some options. There is extensive work being
done over the last few years to make GCC more suitable for
embedded targets btw. But the -O1/-O2/-O3/-Os gives you
four choices only, it's really not so hard to understand
I hope that for more specific goals you need to add more
specific options?


Segher

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2007-06-25 09:45    [W:0.081 / U:0.660 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site