Options enabled under optimization

Fredrik Lundh fredrik at pythonware.com
Fri Jan 13 03:20:28 EST 2006


"Naveen H.S." <naveenh at KPITCummins.com> wrote:

> I had mailed yesterday about the following topic to know the flags or
> options that are enabled when -O,-O2,-O3,-Os options are enabled.
> As mentioned below I was given this mail id to contact.

Unfortunately, you seem to have missed the relevant portions of that
mail:

    "Sounds like a compiler question, not a Python question."

    "Try the documentation or the source code for the compiler you're
    using."

    "On the outside chance your question is actually Python-related
    /snip/ "

> Ex Some flags that are enabled when -O is enabled is
> -fomit-frame-pointer
> -fdefer-pop etc.I would like to know all the flags that will be enabled.

For Python, the answer is "none at all".

$ python -fomit-frame-pointer
Unknown option: -f
usage: python [option] ... [-c cmd | -m mod | file | -] [arg] ...
Try `python -h' for more information.

For gcc, the answer can be found in the gcc documentation, available
from:

    http://gcc.gnu.org/

(this is the first hit if you google for "gcc")

The answer to your question is only a few clicks away from the front-
page:

http://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

(this is the first hit if you google for "gcc optimization options")

Note that the details may differ between compiler versions; use the
"manual" link on the gcc homepage locate the right documentation for
the version you're using.

> I am writing this mail with a lot of hopes; I hope that I would not be
> disappointed this time.

I'm afraid it looks like you're mailing questions to random addresses
based on sloppy google searches, and ignoring the replies.  That's
pretty disappointing.  We really expected more from you.

</F>






More information about the Python-list mailing list