Skip to content

Conversation

aminya
Copy link
Contributor

@aminya aminya commented Jan 30, 2022

No description provided.

@m-ou-se
Copy link
Member

m-ou-se commented May 11, 2022

Disregard strict standards compliance. -Ofast enables all -O3 optimizations. It also enables optimizations that are not valid for all standard-compliant programs.

That seems like a dangerous thing we shouldn't just provide without big warnings. It seems to me that if someone truly did validate that some of these optimizations are in fact okay for their program, they would want to enable that exact flag, and not enable all of them at once without very careful consideration.

@thomcc
Copy link
Member

thomcc commented Mar 21, 2023

I don't think we should offer this really. If users want to configure this themselves then fine, but it's too much of a footgun for the public API IMO.

@aminya
Copy link
Contributor Author

aminya commented Mar 21, 2023

It could be marked as unsafe to communicate the unsafety.

@thomcc
Copy link
Member

thomcc commented Mar 21, 2023

What would the safety contract be? I'm not sure this is the typical meaning of unsafe.

@ChrisDenton
Copy link
Member

Hm, I'm going to close this as not planned at this time. I think at the very least this needs more discussion and more design work. Some of the flags especially, such as -fp:fast, would be concerning to me. And things like -Ob3 (inlining more aggressively) may not necessarily lead to better performance (it depends).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants